summaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-10-25 09:51:26 +0100
committerMark Brown <broonie@linaro.org>2013-10-25 09:51:26 +0100
commita35a1df6357bebf68b78b9222f8ccf224ca7c1c7 (patch)
treea7b0de1436da2e69f021d12054953dff332b8181 /drivers/spi
parent4cd667bb68104b3e4880ce9e2f7a479f28c35895 (diff)
parent95c63cfba777bf2154565abbdc61ea970aaa632c (diff)
Merge remote-tracking branch 'spi/topic/dev' into spi-next
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spidev.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
index ca5bcfe874d..d7c6e36021e 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -37,7 +37,7 @@
#include <linux/spi/spi.h>
#include <linux/spi/spidev.h>
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
/*
@@ -206,9 +206,9 @@ spidev_write(struct file *filp, const char __user *buf,
mutex_lock(&spidev->buf_lock);
missing = copy_from_user(spidev->buffer, buf, count);
- if (missing == 0) {
+ if (missing == 0)
status = spidev_sync_write(spidev, count);
- } else
+ else
status = -EFAULT;
mutex_unlock(&spidev->buf_lock);
@@ -629,7 +629,6 @@ static int spidev_remove(struct spi_device *spi)
/* make sure ops on existing fds can abort cleanly */
spin_lock_irq(&spidev->spi_lock);
spidev->spi = NULL;
- spi_set_drvdata(spi, NULL);
spin_unlock_irq(&spidev->spi_lock);
/* prevent new opens */