summaryrefslogtreecommitdiff
path: root/drivers/staging/iio/resolver/ad2s1200.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-04-30 14:19:23 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-04-30 14:19:23 -0700
commit86281966c7395aa9a13a20c52e26005f5e142451 (patch)
treea4a14499819cc861ac8939935883c2840b0ba216 /drivers/staging/iio/resolver/ad2s1200.c
parentd1db0eea852497762cab43b905b879dfcd3b8987 (diff)
parentbbc28134e915d2e2e8cac0254d1d056db0ae3247 (diff)
Merge tag 'iio-fixes-for-3.15b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linusstaging-3.15-rc4
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.
Diffstat (limited to 'drivers/staging/iio/resolver/ad2s1200.c')
-rw-r--r--drivers/staging/iio/resolver/ad2s1200.c3
1 files changed, 2 insertions, 1 deletions
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)
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;