diff options
| -rw-r--r-- | drivers/iio/adc/Kconfig | 4 | ||||
| -rw-r--r-- | drivers/iio/adc/exynos_adc.c | 6 | ||||
| -rw-r--r-- | drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 7 | ||||
| -rw-r--r-- | drivers/staging/iio/resolver/ad2s1200.c | 3 |
4 files changed, 12 insertions, 8 deletions
diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig index d86196cfe4b4..24c28e3f93a3 100644 --- a/drivers/iio/adc/Kconfig +++ b/drivers/iio/adc/Kconfig | |||
| @@ -106,7 +106,7 @@ config AT91_ADC | |||
| 106 | Say yes here to build support for Atmel AT91 ADC. | 106 | Say yes here to build support for Atmel AT91 ADC. |
| 107 | 107 | ||
| 108 | config EXYNOS_ADC | 108 | config EXYNOS_ADC |
| 109 | bool "Exynos ADC driver support" | 109 | tristate "Exynos ADC driver support" |
| 110 | depends on OF | 110 | depends on OF |
| 111 | help | 111 | help |
| 112 | Core support for the ADC block found in the Samsung EXYNOS series | 112 | Core support for the ADC block found in the Samsung EXYNOS series |
| @@ -114,7 +114,7 @@ config EXYNOS_ADC | |||
| 114 | this resource. | 114 | this resource. |
| 115 | 115 | ||
| 116 | config LP8788_ADC | 116 | config LP8788_ADC |
| 117 | bool "LP8788 ADC driver" | 117 | tristate "LP8788 ADC driver" |
| 118 | depends on MFD_LP8788 | 118 | depends on MFD_LP8788 |
| 119 | help | 119 | help |
| 120 | Say yes here to build support for TI LP8788 ADC. | 120 | Say yes here to build support for TI LP8788 ADC. |
diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c index d25b262193a7..affa93f51789 100644 --- a/drivers/iio/adc/exynos_adc.c +++ b/drivers/iio/adc/exynos_adc.c | |||
| @@ -344,7 +344,7 @@ static int exynos_adc_probe(struct platform_device *pdev) | |||
| 344 | 344 | ||
| 345 | exynos_adc_hw_init(info); | 345 | exynos_adc_hw_init(info); |
| 346 | 346 | ||
| 347 | ret = of_platform_populate(np, exynos_adc_match, NULL, &pdev->dev); | 347 | ret = of_platform_populate(np, exynos_adc_match, NULL, &indio_dev->dev); |
| 348 | if (ret < 0) { | 348 | if (ret < 0) { |
| 349 | dev_err(&pdev->dev, "failed adding child nodes\n"); | 349 | dev_err(&pdev->dev, "failed adding child nodes\n"); |
| 350 | goto err_of_populate; | 350 | goto err_of_populate; |
| @@ -353,7 +353,7 @@ static int exynos_adc_probe(struct platform_device *pdev) | |||
| 353 | return 0; | 353 | return 0; |
| 354 | 354 | ||
| 355 | err_of_populate: | 355 | err_of_populate: |
| 356 | device_for_each_child(&pdev->dev, NULL, | 356 | device_for_each_child(&indio_dev->dev, NULL, |
| 357 | exynos_adc_remove_devices); | 357 | exynos_adc_remove_devices); |
| 358 | regulator_disable(info->vdd); | 358 | regulator_disable(info->vdd); |
| 359 | clk_disable_unprepare(info->clk); | 359 | clk_disable_unprepare(info->clk); |
| @@ -369,7 +369,7 @@ static int exynos_adc_remove(struct platform_device *pdev) | |||
| 369 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); | 369 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); |
| 370 | struct exynos_adc *info = iio_priv(indio_dev); | 370 | struct exynos_adc *info = iio_priv(indio_dev); |
| 371 | 371 | ||
| 372 | device_for_each_child(&pdev->dev, NULL, | 372 | device_for_each_child(&indio_dev->dev, NULL, |
| 373 | exynos_adc_remove_devices); | 373 | exynos_adc_remove_devices); |
| 374 | regulator_disable(info->vdd); | 374 | regulator_disable(info->vdd); |
| 375 | clk_disable_unprepare(info->clk); | 375 | clk_disable_unprepare(info->clk); |
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c index cb9f96b446a5..d8ad606c7cd0 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | |||
| @@ -660,6 +660,7 @@ static int inv_mpu_probe(struct i2c_client *client, | |||
| 660 | { | 660 | { |
| 661 | struct inv_mpu6050_state *st; | 661 | struct inv_mpu6050_state *st; |
| 662 | struct iio_dev *indio_dev; | 662 | struct iio_dev *indio_dev; |
| 663 | struct inv_mpu6050_platform_data *pdata; | ||
| 663 | int result; | 664 | int result; |
| 664 | 665 | ||
| 665 | if (!i2c_check_functionality(client->adapter, | 666 | if (!i2c_check_functionality(client->adapter, |
| @@ -672,8 +673,10 @@ static int inv_mpu_probe(struct i2c_client *client, | |||
| 672 | 673 | ||
| 673 | st = iio_priv(indio_dev); | 674 | st = iio_priv(indio_dev); |
| 674 | st->client = client; | 675 | st->client = client; |
| 675 | st->plat_data = *(struct inv_mpu6050_platform_data | 676 | pdata = (struct inv_mpu6050_platform_data |
| 676 | *)dev_get_platdata(&client->dev); | 677 | *)dev_get_platdata(&client->dev); |
| 678 | if (pdata) | ||
| 679 | st->plat_data = *pdata; | ||
| 677 | /* power is turned on inside check chip type*/ | 680 | /* power is turned on inside check chip type*/ |
| 678 | result = inv_check_and_setup_chip(st, id); | 681 | result = inv_check_and_setup_chip(st, id); |
| 679 | if (result) | 682 | if (result) |
diff --git a/drivers/staging/iio/resolver/ad2s1200.c b/drivers/staging/iio/resolver/ad2s1200.c index e2b482045158..017d2f8379b7 100644 --- a/drivers/staging/iio/resolver/ad2s1200.c +++ b/drivers/staging/iio/resolver/ad2s1200.c | |||
| @@ -107,7 +107,7 @@ static int ad2s1200_probe(struct spi_device *spi) | |||
| 107 | int pn, ret = 0; | 107 | int pn, ret = 0; |
| 108 | unsigned short *pins = spi->dev.platform_data; | 108 | unsigned short *pins = spi->dev.platform_data; |
| 109 | 109 | ||
| 110 | for (pn = 0; pn < AD2S1200_PN; pn++) | 110 | for (pn = 0; pn < AD2S1200_PN; pn++) { |
| 111 | ret = devm_gpio_request_one(&spi->dev, pins[pn], GPIOF_DIR_OUT, | 111 | ret = devm_gpio_request_one(&spi->dev, pins[pn], GPIOF_DIR_OUT, |
| 112 | DRV_NAME); | 112 | DRV_NAME); |
| 113 | if (ret) { | 113 | if (ret) { |
| @@ -115,6 +115,7 @@ static int ad2s1200_probe(struct spi_device *spi) | |||
| 115 | pins[pn]); | 115 | pins[pn]); |
| 116 | return ret; | 116 | return ret; |
| 117 | } | 117 | } |
| 118 | } | ||
| 118 | indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); | 119 | indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); |
| 119 | if (!indio_dev) | 120 | if (!indio_dev) |
| 120 | return -ENOMEM; | 121 | return -ENOMEM; |
