aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-29 15:32:30 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-29 15:32:30 -0400
commitcf204a1b54a5fa34d64676313a1cb0119657388d (patch)
treee0c86bb9fda1b308cf473b3909a36d34a2aab385 /drivers/staging
parent299a62575a63b19add8206642b340f1b54ec4faf (diff)
parent5ae90d8e467e625e447000cb4335c4db973b1095 (diff)
Merge 3.11-rc3 into tty-next
We want the tty fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/android/logger.c4
-rw-r--r--drivers/staging/comedi/TODO2
-rw-r--r--drivers/staging/comedi/comedi_fops.c32
-rw-r--r--drivers/staging/frontier/alphatrack.c2
-rw-r--r--drivers/staging/gdm72xx/gdm_qos.c2
-rw-r--r--drivers/staging/imx-drm/Kconfig1
-rw-r--r--drivers/staging/tidspbridge/pmgr/dbll.c7
-rw-r--r--drivers/staging/zram/zram_drv.c6
8 files changed, 37 insertions, 19 deletions
diff --git a/drivers/staging/android/logger.c b/drivers/staging/android/logger.c
index 080abf2faf97..a8c344422a77 100644
--- a/drivers/staging/android/logger.c
+++ b/drivers/staging/android/logger.c
@@ -469,7 +469,7 @@ static ssize_t logger_aio_write(struct kiocb *iocb, const struct iovec *iov,
469 unsigned long nr_segs, loff_t ppos) 469 unsigned long nr_segs, loff_t ppos)
470{ 470{
471 struct logger_log *log = file_get_log(iocb->ki_filp); 471 struct logger_log *log = file_get_log(iocb->ki_filp);
472 size_t orig = log->w_off; 472 size_t orig;
473 struct logger_entry header; 473 struct logger_entry header;
474 struct timespec now; 474 struct timespec now;
475 ssize_t ret = 0; 475 ssize_t ret = 0;
@@ -490,6 +490,8 @@ static ssize_t logger_aio_write(struct kiocb *iocb, const struct iovec *iov,
490 490
491 mutex_lock(&log->mutex); 491 mutex_lock(&log->mutex);
492 492
493 orig = log->w_off;
494
493 /* 495 /*
494 * Fix up any readers, pulling them forward to the first readable 496 * Fix up any readers, pulling them forward to the first readable
495 * entry after (what will be) the new write offset. We do this now 497 * entry after (what will be) the new write offset. We do this now
diff --git a/drivers/staging/comedi/TODO b/drivers/staging/comedi/TODO
index b10f739b7e3e..fa8da9aada30 100644
--- a/drivers/staging/comedi/TODO
+++ b/drivers/staging/comedi/TODO
@@ -9,4 +9,4 @@ TODO:
9Please send patches to Greg Kroah-Hartman <greg@kroah.com> and 9Please send patches to Greg Kroah-Hartman <greg@kroah.com> and
10copy: 10copy:
11 Ian Abbott <abbotti@mev.co.uk> 11 Ian Abbott <abbotti@mev.co.uk>
12 Frank Mori Hess <fmhess@users.sourceforge.net> 12 H Hartley Sweeten <hsweeten@visionengravers.com>
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index 8647518259f6..f4a197b2d1fd 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -1413,22 +1413,19 @@ static int do_cmd_ioctl(struct comedi_device *dev,
1413 DPRINTK("subdevice busy\n"); 1413 DPRINTK("subdevice busy\n");
1414 return -EBUSY; 1414 return -EBUSY;
1415 } 1415 }
1416 s->busy = file;
1417 1416
1418 /* make sure channel/gain list isn't too long */ 1417 /* make sure channel/gain list isn't too long */
1419 if (cmd.chanlist_len > s->len_chanlist) { 1418 if (cmd.chanlist_len > s->len_chanlist) {
1420 DPRINTK("channel/gain list too long %u > %d\n", 1419 DPRINTK("channel/gain list too long %u > %d\n",
1421 cmd.chanlist_len, s->len_chanlist); 1420 cmd.chanlist_len, s->len_chanlist);
1422 ret = -EINVAL; 1421 return -EINVAL;
1423 goto cleanup;
1424 } 1422 }
1425 1423
1426 /* make sure channel/gain list isn't too short */ 1424 /* make sure channel/gain list isn't too short */
1427 if (cmd.chanlist_len < 1) { 1425 if (cmd.chanlist_len < 1) {
1428 DPRINTK("channel/gain list too short %u < 1\n", 1426 DPRINTK("channel/gain list too short %u < 1\n",
1429 cmd.chanlist_len); 1427 cmd.chanlist_len);
1430 ret = -EINVAL; 1428 return -EINVAL;
1431 goto cleanup;
1432 } 1429 }
1433 1430
1434 async->cmd = cmd; 1431 async->cmd = cmd;
@@ -1438,8 +1435,7 @@ static int do_cmd_ioctl(struct comedi_device *dev,
1438 kmalloc(async->cmd.chanlist_len * sizeof(int), GFP_KERNEL); 1435 kmalloc(async->cmd.chanlist_len * sizeof(int), GFP_KERNEL);
1439 if (!async->cmd.chanlist) { 1436 if (!async->cmd.chanlist) {
1440 DPRINTK("allocation failed\n"); 1437 DPRINTK("allocation failed\n");
1441 ret = -ENOMEM; 1438 return -ENOMEM;
1442 goto cleanup;
1443 } 1439 }
1444 1440
1445 if (copy_from_user(async->cmd.chanlist, user_chanlist, 1441 if (copy_from_user(async->cmd.chanlist, user_chanlist,
@@ -1491,6 +1487,9 @@ static int do_cmd_ioctl(struct comedi_device *dev,
1491 1487
1492 comedi_set_subdevice_runflags(s, ~0, SRF_USER | SRF_RUNNING); 1488 comedi_set_subdevice_runflags(s, ~0, SRF_USER | SRF_RUNNING);
1493 1489
1490 /* set s->busy _after_ setting SRF_RUNNING flag to avoid race with
1491 * comedi_read() or comedi_write() */
1492 s->busy = file;
1494 ret = s->do_cmd(dev, s); 1493 ret = s->do_cmd(dev, s);
1495 if (ret == 0) 1494 if (ret == 0)
1496 return 0; 1495 return 0;
@@ -1705,6 +1704,7 @@ static int do_cancel_ioctl(struct comedi_device *dev, unsigned int arg,
1705 void *file) 1704 void *file)
1706{ 1705{
1707 struct comedi_subdevice *s; 1706 struct comedi_subdevice *s;
1707 int ret;
1708 1708
1709 if (arg >= dev->n_subdevices) 1709 if (arg >= dev->n_subdevices)
1710 return -EINVAL; 1710 return -EINVAL;
@@ -1721,7 +1721,11 @@ static int do_cancel_ioctl(struct comedi_device *dev, unsigned int arg,
1721 if (s->busy != file) 1721 if (s->busy != file)
1722 return -EBUSY; 1722 return -EBUSY;
1723 1723
1724 return do_cancel(dev, s); 1724 ret = do_cancel(dev, s);
1725 if (comedi_get_subdevice_runflags(s) & SRF_USER)
1726 wake_up_interruptible(&s->async->wait_head);
1727
1728 return ret;
1725} 1729}
1726 1730
1727/* 1731/*
@@ -2053,11 +2057,13 @@ static ssize_t comedi_write(struct file *file, const char __user *buf,
2053 2057
2054 if (!comedi_is_subdevice_running(s)) { 2058 if (!comedi_is_subdevice_running(s)) {
2055 if (count == 0) { 2059 if (count == 0) {
2060 mutex_lock(&dev->mutex);
2056 if (comedi_is_subdevice_in_error(s)) 2061 if (comedi_is_subdevice_in_error(s))
2057 retval = -EPIPE; 2062 retval = -EPIPE;
2058 else 2063 else
2059 retval = 0; 2064 retval = 0;
2060 do_become_nonbusy(dev, s); 2065 do_become_nonbusy(dev, s);
2066 mutex_unlock(&dev->mutex);
2061 } 2067 }
2062 break; 2068 break;
2063 } 2069 }
@@ -2156,11 +2162,13 @@ static ssize_t comedi_read(struct file *file, char __user *buf, size_t nbytes,
2156 2162
2157 if (n == 0) { 2163 if (n == 0) {
2158 if (!comedi_is_subdevice_running(s)) { 2164 if (!comedi_is_subdevice_running(s)) {
2165 mutex_lock(&dev->mutex);
2159 do_become_nonbusy(dev, s); 2166 do_become_nonbusy(dev, s);
2160 if (comedi_is_subdevice_in_error(s)) 2167 if (comedi_is_subdevice_in_error(s))
2161 retval = -EPIPE; 2168 retval = -EPIPE;
2162 else 2169 else
2163 retval = 0; 2170 retval = 0;
2171 mutex_unlock(&dev->mutex);
2164 break; 2172 break;
2165 } 2173 }
2166 if (file->f_flags & O_NONBLOCK) { 2174 if (file->f_flags & O_NONBLOCK) {
@@ -2198,9 +2206,11 @@ static ssize_t comedi_read(struct file *file, char __user *buf, size_t nbytes,
2198 buf += n; 2206 buf += n;
2199 break; /* makes device work like a pipe */ 2207 break; /* makes device work like a pipe */
2200 } 2208 }
2201 if (comedi_is_subdevice_idle(s) && 2209 if (comedi_is_subdevice_idle(s)) {
2202 async->buf_read_count - async->buf_write_count == 0) { 2210 mutex_lock(&dev->mutex);
2203 do_become_nonbusy(dev, s); 2211 if (async->buf_read_count - async->buf_write_count == 0)
2212 do_become_nonbusy(dev, s);
2213 mutex_unlock(&dev->mutex);
2204 } 2214 }
2205 set_current_state(TASK_RUNNING); 2215 set_current_state(TASK_RUNNING);
2206 remove_wait_queue(&async->wait_head, &wait); 2216 remove_wait_queue(&async->wait_head, &wait);
diff --git a/drivers/staging/frontier/alphatrack.c b/drivers/staging/frontier/alphatrack.c
index 5590ebf1da15..817f837b240d 100644
--- a/drivers/staging/frontier/alphatrack.c
+++ b/drivers/staging/frontier/alphatrack.c
@@ -827,11 +827,11 @@ static void usb_alphatrack_disconnect(struct usb_interface *intf)
827 mutex_unlock(&dev->mtx); 827 mutex_unlock(&dev->mtx);
828 usb_alphatrack_delete(dev); 828 usb_alphatrack_delete(dev);
829 } else { 829 } else {
830 atomic_set(&dev->writes_pending, 0);
830 dev->intf = NULL; 831 dev->intf = NULL;
831 mutex_unlock(&dev->mtx); 832 mutex_unlock(&dev->mtx);
832 } 833 }
833 834
834 atomic_set(&dev->writes_pending, 0);
835 mutex_unlock(&disconnect_mutex); 835 mutex_unlock(&disconnect_mutex);
836 836
837 dev_info(&intf->dev, "Alphatrack Surface #%d now disconnected\n", 837 dev_info(&intf->dev, "Alphatrack Surface #%d now disconnected\n",
diff --git a/drivers/staging/gdm72xx/gdm_qos.c b/drivers/staging/gdm72xx/gdm_qos.c
index b795353e8348..cc3692439a5c 100644
--- a/drivers/staging/gdm72xx/gdm_qos.c
+++ b/drivers/staging/gdm72xx/gdm_qos.c
@@ -250,8 +250,8 @@ static void send_qos_list(struct nic *nic, struct list_head *head)
250 250
251 list_for_each_entry_safe(entry, n, head, list) { 251 list_for_each_entry_safe(entry, n, head, list) {
252 list_del(&entry->list); 252 list_del(&entry->list);
253 free_qos_entry(entry);
254 gdm_wimax_send_tx(entry->skb, entry->dev); 253 gdm_wimax_send_tx(entry->skb, entry->dev);
254 free_qos_entry(entry);
255 } 255 }
256} 256}
257 257
diff --git a/drivers/staging/imx-drm/Kconfig b/drivers/staging/imx-drm/Kconfig
index 22339059837f..bd0f2fd01db4 100644
--- a/drivers/staging/imx-drm/Kconfig
+++ b/drivers/staging/imx-drm/Kconfig
@@ -33,7 +33,6 @@ config DRM_IMX_TVE
33config DRM_IMX_LDB 33config DRM_IMX_LDB
34 tristate "Support for LVDS displays" 34 tristate "Support for LVDS displays"
35 depends on DRM_IMX 35 depends on DRM_IMX
36 select OF_VIDEOMODE
37 help 36 help
38 Choose this to enable the internal LVDS Display Bridge (LDB) 37 Choose this to enable the internal LVDS Display Bridge (LDB)
39 found on i.MX53 and i.MX6 processors. 38 found on i.MX53 and i.MX6 processors.
diff --git a/drivers/staging/tidspbridge/pmgr/dbll.c b/drivers/staging/tidspbridge/pmgr/dbll.c
index c191ae203565..41e88abe47af 100644
--- a/drivers/staging/tidspbridge/pmgr/dbll.c
+++ b/drivers/staging/tidspbridge/pmgr/dbll.c
@@ -1120,8 +1120,11 @@ static int dbll_rmm_alloc(struct dynamic_loader_allocate *this,
1120 or DYN_EXTERNAL, then mem granularity information is present 1120 or DYN_EXTERNAL, then mem granularity information is present
1121 within the section name - only process if there are at least three 1121 within the section name - only process if there are at least three
1122 tokens within the section name (just a minor optimization) */ 1122 tokens within the section name (just a minor optimization) */
1123 if (count >= 3) 1123 if (count >= 3) {
1124 strict_strtol(sz_last_token, 10, (long *)&req); 1124 status = kstrtos32(sz_last_token, 10, &req);
1125 if (status)
1126 goto func_cont;
1127 }
1125 1128
1126 if ((req == 0) || (req == 1)) { 1129 if ((req == 0) || (req == 1)) {
1127 if (strcmp(sz_sec_last_token, "DYN_DARAM") == 0) { 1130 if (strcmp(sz_sec_last_token, "DYN_DARAM") == 0) {
diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c
index 82c7202fd5cc..e77fb6ea40c9 100644
--- a/drivers/staging/zram/zram_drv.c
+++ b/drivers/staging/zram/zram_drv.c
@@ -527,8 +527,11 @@ static void zram_reset_device(struct zram *zram)
527 size_t index; 527 size_t index;
528 struct zram_meta *meta; 528 struct zram_meta *meta;
529 529
530 if (!zram->init_done) 530 down_write(&zram->init_lock);
531 if (!zram->init_done) {
532 up_write(&zram->init_lock);
531 return; 533 return;
534 }
532 535
533 meta = zram->meta; 536 meta = zram->meta;
534 zram->init_done = 0; 537 zram->init_done = 0;
@@ -549,6 +552,7 @@ static void zram_reset_device(struct zram *zram)
549 552
550 zram->disksize = 0; 553 zram->disksize = 0;
551 set_capacity(zram->disk, 0); 554 set_capacity(zram->disk, 0);
555 up_write(&zram->init_lock);
552} 556}
553 557
554static void zram_init_device(struct zram *zram, struct zram_meta *meta) 558static void zram_init_device(struct zram *zram, struct zram_meta *meta)