diff options
author | Anders Roxell <anders.roxell@linaro.org> | 2016-08-10 12:11:15 +0200 |
---|---|---|
committer | Anders Roxell <anders.roxell@linaro.org> | 2016-08-10 12:11:15 +0200 |
commit | a44038112d3379f49df8a9db3e1259d9e945faee (patch) | |
tree | 198f8ef7dcba389b87dbd3cac861d896b5bfd77d /drivers/spi/spi.c | |
parent | 590e935df0c94b2d7a4584bb26906666176a6133 (diff) | |
parent | 0e790100f1c49f32a390d0cc55801230fd04ba56 (diff) |
Merge remote-tracking branch 'lsk/linux-linaro-lsk-v3.18' into linux-linaro-lsk-v3.18-rtlsk-v3.18-16.09-rtlinux-linaro-lsk-v3.18-rt-test
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Conflicts:
kernel/futex.c
kernel/printk/printk.c
kernel/softirq.c
mm/slub.c
mm/swap.c
Diffstat (limited to 'drivers/spi/spi.c')
-rw-r--r-- | drivers/spi/spi.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 1c72be19e70e..85a6da81723a 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1059,9 +1059,6 @@ void spi_finalize_current_message(struct spi_master *master) spin_lock_irqsave(&master->queue_lock, flags); mesg = master->cur_msg; - master->cur_msg = NULL; - - queue_kthread_work(&master->kworker, &master->pump_messages); spin_unlock_irqrestore(&master->queue_lock, flags); spi_unmap_msg(master, mesg); @@ -1074,9 +1071,13 @@ void spi_finalize_current_message(struct spi_master *master) } } - trace_spi_message_done(mesg); - + spin_lock_irqsave(&master->queue_lock, flags); + master->cur_msg = NULL; master->cur_msg_prepared = false; + queue_kthread_work(&master->kworker, &master->pump_messages); + spin_unlock_irqrestore(&master->queue_lock, flags); + + trace_spi_message_done(mesg); mesg->state = NULL; if (mesg->complete) @@ -1477,8 +1478,7 @@ static struct class spi_master_class = { * * The caller is responsible for assigning the bus number and initializing * the master's methods before calling spi_register_master(); and (after errors - * adding the device) calling spi_master_put() and kfree() to prevent a memory - * leak. + * adding the device) calling spi_master_put() to prevent a memory leak. */ struct spi_master *spi_alloc_master(struct device *dev, unsigned size) { |