From: Greg Kroah-Hartman Date: Wed, 25 Sep 2013 15:59:04 +0000 (-0700) Subject: Merge 3.12-rc2 into staging-next. X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e2aad1d5716c5f7fa5deb4a96e6b6a4e9f24e78b;p=openwrt%2Fstaging%2Fblogic.git Merge 3.12-rc2 into staging-next. This resolves the merge problem with two iio drivers that Stephen Rothwell pointed out. Reported-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman --- e2aad1d5716c5f7fa5deb4a96e6b6a4e9f24e78b diff --cc drivers/iio/industrialio-buffer.c index 2361fbc74e33,2710f7245c3b..e9f389b9da69 --- a/drivers/iio/industrialio-buffer.c +++ b/drivers/iio/industrialio-buffer.c @@@ -521,9 -546,16 +540,16 @@@ int iio_update_buffers(struct iio_dev * * Roll back. * Note can only occur when adding a buffer. */ - list_del(&insert_buffer->buffer_list); + list_del_init(&insert_buffer->buffer_list); - indio_dev->active_scan_mask = old_mask; - success = -EINVAL; + if (old_mask) { + indio_dev->active_scan_mask = old_mask; + success = -EINVAL; + } + else { + kfree(compound_mask); + ret = -EINVAL; + goto error_ret; + } } } else { indio_dev->active_scan_mask = compound_mask; diff --cc drivers/iio/industrialio-event.c index 2390e3d08e48,6be65ef5faa9..36f0c8e0eb3d --- a/drivers/iio/industrialio-event.c +++ b/drivers/iio/industrialio-event.c @@@ -158,8 -163,10 +163,10 @@@ int iio_event_getfd(struct iio_dev *ind return -EBUSY; } spin_unlock_irq(&ev_int->wait.lock); - fd = anon_inode_getfd("iio:event", - &iio_event_chrdev_fileops, ev_int, O_RDONLY | O_CLOEXEC); + iio_device_get(indio_dev); + + fd = anon_inode_getfd("iio:event", &iio_event_chrdev_fileops, - indio_dev, O_RDONLY); ++ indio_dev, O_RDONLY | O_CLOEXEC); if (fd < 0) { spin_lock_irq(&ev_int->wait.lock); __clear_bit(IIO_BUSY_BIT_POS, &ev_int->flags); diff --cc drivers/staging/iio/meter/ade7854-spi.c index 7cb8d931625c,4c6d2041260b..94f73bbbc0fd --- a/drivers/staging/iio/meter/ade7854-spi.c +++ b/drivers/staging/iio/meter/ade7854-spi.c @@@ -296,8 -296,10 +296,8 @@@ static int ade7854_spi_probe(struct spi ret = ade7854_probe(indio_dev, &spi->dev); - if (ret) - iio_device_free(indio_dev); - return 0; + return ret; } static int ade7854_spi_remove(struct spi_device *spi)