Second set of fixes for IIO in the 3.15 cycle.
* ad2s1200 - Fix some missing parenthesis in a for statement that could have led to an error being missed when getting gpios. * Fix a null derefference issue in the mpu6050 when platform data is not provided (or is provided via the device tree for example). * exynos_adc bug on remove due to child devices having been added to the parent of the IIO device rather than the IIO device itself. This caused an issue with the IIO device removing itself in it's remove function. * Make all ADC drivers buildable as modules to avoid dependency issues if the IIO core is itself built as a module. The exynos adc bug became apparently whilst this fix was being tested. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJTW8mSAAoJEFSFNJnE9BaI9jsP/AlX5/G8f5jynM1C0WNQ3WaA EigVPSWbZgIUaPoMCULNTFoKCB/o76ecR83t+q8+b/2i/wyTdvI+5nmDhR5kH/mN m5nRHjYT3mv2u8WnXQgoY7LtcaGDPFEG8TgykXCq4e6OeEa5rpCjeDcVWe6ogT2i jtrgOLvbW+y99GY8nGng5B3vqPyQoQQxiZBVvHstRlSFJbyRD2PaCsoWlu5ap1c1 xbuVf2T48rfTskqZK8gzlGeXszZsrGeU4UZBCBMxIfG3Q5KtOtMj1FgfNBr/Dwgp AgYwY7x5V7CV3pucMBB7ZES8NPjXh3POQhrx9ZWWHZzMAMDjlbTDjUQFSZHiT1MO tfh9B3aGNxpWJ/wv23wPlyFSQ8/ffTWA6v8VlxkItrwJa5123FdDPRsHvn4cTAJe LHNeERlRYJbOZd+iPyojObwpU7le4f/yk2heb45TlRmb5vAuJd7VWDXkjO3XRZJB ya1gYUEbC+XF8gnFSrEOLI7RTYUcBIB216PPODP3jh4Ui32lfDgGvqr2QSy5XMZF JK8SChrVw/OhC8th+/qOKGmSnjxfVx1IndpzdnrCD5c6B3YeFKkk7dzwBLIMXubW MOcVguVOZawgtodff48uoCQ9EJlvVpSWf6ps/oWdYDIp0zur50lFokixIggUYQc0 WYiQk6D+Lovmb9x9BYms =qTIz -----END PGP SIGNATURE----- Merge tag 'iio-fixes-for-3.15b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: Second set of fixes for IIO in the 3.15 cycle. * ad2s1200 - Fix some missing parenthesis in a for statement that could have led to an error being missed when getting gpios. * Fix a null derefference issue in the mpu6050 when platform data is not provided (or is provided via the device tree for example). * exynos_adc bug on remove due to child devices having been added to the parent of the IIO device rather than the IIO device itself. This caused an issue with the IIO device removing itself in it's remove function. * Make all ADC drivers buildable as modules to avoid dependency issues if the IIO core is itself built as a module. The exynos adc bug became apparently whilst this fix was being tested.
This commit is contained in:
Коммит
86281966c7
|
@ -106,7 +106,7 @@ config AT91_ADC
|
|||
Say yes here to build support for Atmel AT91 ADC.
|
||||
|
||||
config EXYNOS_ADC
|
||||
bool "Exynos ADC driver support"
|
||||
tristate "Exynos ADC driver support"
|
||||
depends on OF
|
||||
help
|
||||
Core support for the ADC block found in the Samsung EXYNOS series
|
||||
|
@ -114,7 +114,7 @@ config EXYNOS_ADC
|
|||
this resource.
|
||||
|
||||
config LP8788_ADC
|
||||
bool "LP8788 ADC driver"
|
||||
tristate "LP8788 ADC driver"
|
||||
depends on MFD_LP8788
|
||||
help
|
||||
Say yes here to build support for TI LP8788 ADC.
|
||||
|
|
|
@ -344,7 +344,7 @@ static int exynos_adc_probe(struct platform_device *pdev)
|
|||
|
||||
exynos_adc_hw_init(info);
|
||||
|
||||
ret = of_platform_populate(np, exynos_adc_match, NULL, &pdev->dev);
|
||||
ret = of_platform_populate(np, exynos_adc_match, NULL, &indio_dev->dev);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "failed adding child nodes\n");
|
||||
goto err_of_populate;
|
||||
|
@ -353,7 +353,7 @@ static int exynos_adc_probe(struct platform_device *pdev)
|
|||
return 0;
|
||||
|
||||
err_of_populate:
|
||||
device_for_each_child(&pdev->dev, NULL,
|
||||
device_for_each_child(&indio_dev->dev, NULL,
|
||||
exynos_adc_remove_devices);
|
||||
regulator_disable(info->vdd);
|
||||
clk_disable_unprepare(info->clk);
|
||||
|
@ -369,7 +369,7 @@ static int exynos_adc_remove(struct platform_device *pdev)
|
|||
struct iio_dev *indio_dev = platform_get_drvdata(pdev);
|
||||
struct exynos_adc *info = iio_priv(indio_dev);
|
||||
|
||||
device_for_each_child(&pdev->dev, NULL,
|
||||
device_for_each_child(&indio_dev->dev, NULL,
|
||||
exynos_adc_remove_devices);
|
||||
regulator_disable(info->vdd);
|
||||
clk_disable_unprepare(info->clk);
|
||||
|
|
|
@ -660,6 +660,7 @@ static int inv_mpu_probe(struct i2c_client *client,
|
|||
{
|
||||
struct inv_mpu6050_state *st;
|
||||
struct iio_dev *indio_dev;
|
||||
struct inv_mpu6050_platform_data *pdata;
|
||||
int result;
|
||||
|
||||
if (!i2c_check_functionality(client->adapter,
|
||||
|
@ -672,8 +673,10 @@ static int inv_mpu_probe(struct i2c_client *client,
|
|||
|
||||
st = iio_priv(indio_dev);
|
||||
st->client = client;
|
||||
st->plat_data = *(struct inv_mpu6050_platform_data
|
||||
*)dev_get_platdata(&client->dev);
|
||||
pdata = (struct inv_mpu6050_platform_data
|
||||
*)dev_get_platdata(&client->dev);
|
||||
if (pdata)
|
||||
st->plat_data = *pdata;
|
||||
/* power is turned on inside check chip type*/
|
||||
result = inv_check_and_setup_chip(st, id);
|
||||
if (result)
|
||||
|
|
|
@ -107,7 +107,7 @@ static int ad2s1200_probe(struct spi_device *spi)
|
|||
int pn, ret = 0;
|
||||
unsigned short *pins = spi->dev.platform_data;
|
||||
|
||||
for (pn = 0; pn < AD2S1200_PN; pn++)
|
||||
for (pn = 0; pn < AD2S1200_PN; pn++) {
|
||||
ret = devm_gpio_request_one(&spi->dev, pins[pn], GPIOF_DIR_OUT,
|
||||
DRV_NAME);
|
||||
if (ret) {
|
||||
|
@ -115,6 +115,7 @@ static int ad2s1200_probe(struct spi_device *spi)
|
|||
pins[pn]);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
|
||||
if (!indio_dev)
|
||||
return -ENOMEM;
|
||||
|
|
Загрузка…
Ссылка в новой задаче