mirror of https://gitee.com/openkylin/linux.git
Char / misc driver fixes for 3.12-rc6
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. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEABECAAYFAlJgHiwACgkQMUfUDdst+ykS3gCgiJqKAbzsb+hNiI/AXmCHtcWV cK4AoIEXbg+nMYPzSuSPz1nr2vJPr3CP =5WpE -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
66eb411ea2
|
@ -525,8 +525,10 @@ static int adf4350_probe(struct spi_device *spi)
|
|||
}
|
||||
|
||||
indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
|
||||
if (indio_dev == NULL)
|
||||
return -ENOMEM;
|
||||
if (indio_dev == NULL) {
|
||||
ret = -ENOMEM;
|
||||
goto error_disable_clk;
|
||||
}
|
||||
|
||||
st = iio_priv(indio_dev);
|
||||
|
||||
|
|
|
@ -477,6 +477,9 @@ void iio_disable_all_buffers(struct iio_dev *indio_dev)
|
|||
indio_dev->currentmode = INDIO_DIRECT_MODE;
|
||||
if (indio_dev->setup_ops->postdisable)
|
||||
indio_dev->setup_ops->postdisable(indio_dev);
|
||||
|
||||
if (indio_dev->available_scan_masks == NULL)
|
||||
kfree(indio_dev->active_scan_mask);
|
||||
}
|
||||
|
||||
int iio_update_buffers(struct iio_dev *indio_dev,
|
||||
|
|
|
@ -613,6 +613,9 @@ static int w1_bus_notify(struct notifier_block *nb, unsigned long action,
|
|||
sl = dev_to_w1_slave(dev);
|
||||
fops = sl->family->fops;
|
||||
|
||||
if (!fops)
|
||||
return 0;
|
||||
|
||||
switch (action) {
|
||||
case BUS_NOTIFY_ADD_DEVICE:
|
||||
/* 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)
|
|||
atomic_set(&sl->refcnt, 0);
|
||||
init_completion(&sl->released);
|
||||
|
||||
/* slave modules need to be loaded in a context with unlocked mutex */
|
||||
mutex_unlock(&dev->mutex);
|
||||
request_module("w1-family-0x%0x", rn->family);
|
||||
mutex_lock(&dev->mutex);
|
||||
|
||||
spin_lock(&w1_flock);
|
||||
f = w1_family_registered(rn->family);
|
||||
|
|
Loading…
Reference in New Issue