Second set of IIO fixes for the 3.12 cycle (take 2)
A few small fixes: 1) Make sure that debugfs entries are removed early enough to prevent a race. 2) Drop a stray regulator_put from ad8366 left over from the devm_ patches. 3) The ST magnetometer driver had incorrect register addresses for the actual data channels. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (GNU/Linux) iQIcBAABAgAGBQJSSeOTAAoJEFSFNJnE9BaIOhkP/jPAYooCfxvjeQojbgBlHBxj clCCypUrAqSXGrmhLktwV1u1jgAo4WsP1jg5AOeC0vGXksG3aA5GEU+hsHq81Jmi jHIbrbyPGAuQa+UMhhoNZ5IR+8UnsZ0M67G1mvZz55kV3KETZglAOBWykjGiG0Gt /d0gqeohk6wMMLI7GPs+Y+6vlwRoUscJ+Xx8IxMtj0ZRQhlVp7IYn2LF0STm2sNS lbhFqf6lcTaXJb9vD0aYNGtVjo4Ew+5DMb/XtCHs1k7EciGT9yMF7DfkHgEu9/hd 1Rjwzll2vwAhrlKel+/HYS0ofKJKsyD5zD8wW2o+F8F/HRm0X6UbWDZtur6uAGCL 4YstAOA2kxQc8eh2mSYDCCM9CnFLR5hjW/oKSXO5MkuFtQukWd6kd79Ft72IKdpl XkiUi4YWz4RKVIPsBdLYu5ZoiLJH7QwBt0qLq7DGh28CfBYvXcbF9f9JEOhAlffn aS25sfMf0/3jOJ+Uk5F+lleKukggeaLkVFbXAubalaVybB0alscMew0YAfVI/viQ AbokriBBV3dFQzdqwVy/0meKvLqHAA19LmeAhDIoVhLxQYzylpuZYVmpmh47+kO0 5gO4M2TYSNRgafQaFZGzJiEy+YDF+AAaGmzttEdeT6Bchy5o1Qo2UL8+nmHrNwc+ bcEECJ82i3yEI+/rVlrY =c+WH -----END PGP SIGNATURE----- Merge tag 'iio-fixes-for-3.12b2' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: Second set of IIO fixes for the 3.12 cycle (take 2) A few small fixes: 1) Make sure that debugfs entries are removed early enough to prevent a race. 2) Drop a stray regulator_put from ad8366 left over from the devm_ patches. 3) The ST magnetometer driver had incorrect register addresses for the actual data channels.
This commit is contained in:
Коммит
a7ebaf4646
|
@ -185,10 +185,8 @@ static int ad8366_remove(struct spi_device *spi)
|
|||
|
||||
iio_device_unregister(indio_dev);
|
||||
|
||||
if (!IS_ERR(reg)) {
|
||||
if (!IS_ERR(reg))
|
||||
regulator_disable(reg);
|
||||
regulator_put(reg);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -852,7 +852,6 @@ static void iio_dev_release(struct device *device)
|
|||
iio_device_unregister_trigger_consumer(indio_dev);
|
||||
iio_device_unregister_eventset(indio_dev);
|
||||
iio_device_unregister_sysfs(indio_dev);
|
||||
iio_device_unregister_debugfs(indio_dev);
|
||||
|
||||
ida_simple_remove(&iio_ida, indio_dev->id);
|
||||
kfree(indio_dev);
|
||||
|
@ -1087,6 +1086,7 @@ void iio_device_unregister(struct iio_dev *indio_dev)
|
|||
|
||||
if (indio_dev->chrdev.dev)
|
||||
cdev_del(&indio_dev->chrdev);
|
||||
iio_device_unregister_debugfs(indio_dev);
|
||||
|
||||
iio_disable_all_buffers(indio_dev);
|
||||
|
||||
|
|
|
@ -29,9 +29,9 @@
|
|||
#define ST_MAGN_NUMBER_DATA_CHANNELS 3
|
||||
|
||||
/* DEFAULT VALUE FOR SENSORS */
|
||||
#define ST_MAGN_DEFAULT_OUT_X_L_ADDR 0X04
|
||||
#define ST_MAGN_DEFAULT_OUT_Y_L_ADDR 0X08
|
||||
#define ST_MAGN_DEFAULT_OUT_Z_L_ADDR 0X06
|
||||
#define ST_MAGN_DEFAULT_OUT_X_H_ADDR 0X03
|
||||
#define ST_MAGN_DEFAULT_OUT_Y_H_ADDR 0X07
|
||||
#define ST_MAGN_DEFAULT_OUT_Z_H_ADDR 0X05
|
||||
|
||||
/* FULLSCALE */
|
||||
#define ST_MAGN_FS_AVL_1300MG 1300
|
||||
|
@ -117,16 +117,16 @@
|
|||
static const struct iio_chan_spec st_magn_16bit_channels[] = {
|
||||
ST_SENSORS_LSM_CHANNELS(IIO_MAGN,
|
||||
BIT(IIO_CHAN_INFO_RAW) | BIT(IIO_CHAN_INFO_SCALE),
|
||||
ST_SENSORS_SCAN_X, 1, IIO_MOD_X, 's', IIO_LE, 16, 16,
|
||||
ST_MAGN_DEFAULT_OUT_X_L_ADDR),
|
||||
ST_SENSORS_SCAN_X, 1, IIO_MOD_X, 's', IIO_BE, 16, 16,
|
||||
ST_MAGN_DEFAULT_OUT_X_H_ADDR),
|
||||
ST_SENSORS_LSM_CHANNELS(IIO_MAGN,
|
||||
BIT(IIO_CHAN_INFO_RAW) | BIT(IIO_CHAN_INFO_SCALE),
|
||||
ST_SENSORS_SCAN_Y, 1, IIO_MOD_Y, 's', IIO_LE, 16, 16,
|
||||
ST_MAGN_DEFAULT_OUT_Y_L_ADDR),
|
||||
ST_SENSORS_SCAN_Y, 1, IIO_MOD_Y, 's', IIO_BE, 16, 16,
|
||||
ST_MAGN_DEFAULT_OUT_Y_H_ADDR),
|
||||
ST_SENSORS_LSM_CHANNELS(IIO_MAGN,
|
||||
BIT(IIO_CHAN_INFO_RAW) | BIT(IIO_CHAN_INFO_SCALE),
|
||||
ST_SENSORS_SCAN_Z, 1, IIO_MOD_Z, 's', IIO_LE, 16, 16,
|
||||
ST_MAGN_DEFAULT_OUT_Z_L_ADDR),
|
||||
ST_SENSORS_SCAN_Z, 1, IIO_MOD_Z, 's', IIO_BE, 16, 16,
|
||||
ST_MAGN_DEFAULT_OUT_Z_H_ADDR),
|
||||
IIO_CHAN_SOFT_TIMESTAMP(3)
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче