Skip to content

Commit

Permalink
Merge tag 'staging-3.15-rc4' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/gregkh/staging

Pull staging / iio fixes from Greg KH:
 "Here are some small IIO driver fixes for 3.15-rc4 that resolve some
  reported issues"

* tag 'staging-3.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  iio: adc: Nothing in ADC should be a bool CONFIG
  iio: exynos_adc: use indio_dev->dev structure to handle child nodes
  iio:imu:mpu6050: Fixed segfault in Invensens MPU driver due to null dereference
  staging:iio:ad2s1200 fix missing parenthesis in a for statment.
  • Loading branch information
Linus Torvalds committed May 5, 2014
2 parents 03787ff + 8628196 commit a1e7446
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions drivers/iio/adc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@ 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
of SoCs for drivers such as the touchscreen and hwmon to use to share
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.
Expand Down
6 changes: 3 additions & 3 deletions drivers/iio/adc/exynos_adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand All @@ -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);
Expand Down
7 changes: 5 additions & 2 deletions drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion drivers/staging/iio/resolver/ad2s1200.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,15 @@ 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) {
dev_err(&spi->dev, "request gpio pin %d failed\n",
pins[pn]);
return ret;
}
}
indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
if (!indio_dev)
return -ENOMEM;
Expand Down

0 comments on commit a1e7446

Please sign in to comment.