diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-10-17 13:36:57 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-10-17 13:36:57 -0400 |
| commit | 66eb411ea2d8d12eacc0eadcd5004a1736994814 (patch) | |
| tree | 3b0f4ba31f81010eb51ebca8c5c8bff5506a487b | |
| parent | 630db0e3d2134b0f7949f912ae2adeec6f765719 (diff) | |
| parent | e13cef8ded69e469b56e150e30619693b91b1864 (diff) | |
Merge tag 'char-misc-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver fixes from Greg KH:
"Here are some small iio and w1 driver fixes for 3.12-rc6.
There is also a hyper-v fix in here, which turned out to be incorrect,
so it was reverted. That will probably have to wait unto 3.13-rc1 to
get accepted as it's still being discussed"
* tag 'char-misc-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
Revert "Drivers: hv: vmbus: Fix a bug in channel rescind code"
Drivers: hv: vmbus: Fix a bug in channel rescind code
iio:buffer: Free active scan mask in iio_disable_all_buffers()
iio: frequency: adf4350: add missing clk_disable_unprepare() on error in adf4350_probe()
w1 - call request_module with w1 master mutex unlocked
w1 - fix fops in w1_bus_notify
| -rw-r--r-- | drivers/iio/frequency/adf4350.c | 6 | ||||
| -rw-r--r-- | drivers/iio/industrialio-buffer.c | 3 | ||||
| -rw-r--r-- | drivers/w1/w1.c | 6 |
3 files changed, 13 insertions, 2 deletions
diff --git a/drivers/iio/frequency/adf4350.c b/drivers/iio/frequency/adf4350.c index a7b30be86ae0..52605c0ea3a6 100644 --- a/drivers/iio/frequency/adf4350.c +++ b/drivers/iio/frequency/adf4350.c | |||
| @@ -525,8 +525,10 @@ static int adf4350_probe(struct spi_device *spi) | |||
| 525 | } | 525 | } |
| 526 | 526 | ||
| 527 | indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); | 527 | indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); |
| 528 | if (indio_dev == NULL) | 528 | if (indio_dev == NULL) { |
| 529 | return -ENOMEM; | 529 | ret = -ENOMEM; |
| 530 | goto error_disable_clk; | ||
| 531 | } | ||
| 530 | 532 | ||
| 531 | st = iio_priv(indio_dev); | 533 | st = iio_priv(indio_dev); |
| 532 | 534 | ||
diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c index 2710f7245c3b..2db7dcd826b9 100644 --- a/drivers/iio/industrialio-buffer.c +++ b/drivers/iio/industrialio-buffer.c | |||
| @@ -477,6 +477,9 @@ void iio_disable_all_buffers(struct iio_dev *indio_dev) | |||
| 477 | indio_dev->currentmode = INDIO_DIRECT_MODE; | 477 | indio_dev->currentmode = INDIO_DIRECT_MODE; |
| 478 | if (indio_dev->setup_ops->postdisable) | 478 | if (indio_dev->setup_ops->postdisable) |
| 479 | indio_dev->setup_ops->postdisable(indio_dev); | 479 | indio_dev->setup_ops->postdisable(indio_dev); |
| 480 | |||
| 481 | if (indio_dev->available_scan_masks == NULL) | ||
| 482 | kfree(indio_dev->active_scan_mask); | ||
| 480 | } | 483 | } |
| 481 | 484 | ||
| 482 | int iio_update_buffers(struct iio_dev *indio_dev, | 485 | int iio_update_buffers(struct iio_dev *indio_dev, |
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index c7c64f18773d..fa932c2f7d97 100644 --- a/drivers/w1/w1.c +++ b/drivers/w1/w1.c | |||
| @@ -613,6 +613,9 @@ static int w1_bus_notify(struct notifier_block *nb, unsigned long action, | |||
| 613 | sl = dev_to_w1_slave(dev); | 613 | sl = dev_to_w1_slave(dev); |
| 614 | fops = sl->family->fops; | 614 | fops = sl->family->fops; |
| 615 | 615 | ||
| 616 | if (!fops) | ||
| 617 | return 0; | ||
| 618 | |||
| 616 | switch (action) { | 619 | switch (action) { |
| 617 | case BUS_NOTIFY_ADD_DEVICE: | 620 | case BUS_NOTIFY_ADD_DEVICE: |
| 618 | /* if the family driver needs to initialize something... */ | 621 | /* if the family driver needs to initialize something... */ |
| @@ -713,7 +716,10 @@ static int w1_attach_slave_device(struct w1_master *dev, struct w1_reg_num *rn) | |||
| 713 | atomic_set(&sl->refcnt, 0); | 716 | atomic_set(&sl->refcnt, 0); |
| 714 | init_completion(&sl->released); | 717 | init_completion(&sl->released); |
| 715 | 718 | ||
| 719 | /* slave modules need to be loaded in a context with unlocked mutex */ | ||
| 720 | mutex_unlock(&dev->mutex); | ||
| 716 | request_module("w1-family-0x%0x", rn->family); | 721 | request_module("w1-family-0x%0x", rn->family); |
| 722 | mutex_lock(&dev->mutex); | ||
| 717 | 723 | ||
| 718 | spin_lock(&w1_flock); | 724 | spin_lock(&w1_flock); |
| 719 | f = w1_family_registered(rn->family); | 725 | f = w1_family_registered(rn->family); |
