summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/iio/adc/adt7410.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/iio/adc/adt7410.c b/drivers/staging/iio/adc/adt7410.c
index 1a4197013e9b..42fe2c8c49f3 100644
--- a/drivers/staging/iio/adc/adt7410.c
+++ b/drivers/staging/iio/adc/adt7410.c
@@ -720,6 +720,7 @@ static int __devinit adt7410_probe(struct i2c_client *client,
struct iio_dev *indio_dev;
int ret = 0;
unsigned long *adt7410_platform_data = client->dev.platform_data;
+ unsigned long local_pdata[] = {0, 0};
indio_dev = iio_device_alloc(sizeof(*chip));
if (indio_dev == NULL) {
@@ -737,6 +738,9 @@ static int __devinit adt7410_probe(struct i2c_client *client,
indio_dev->info = &adt7410_info;
indio_dev->modes = INDIO_DIRECT_MODE;
+ if (!adt7410_platform_data)
+ adt7410_platform_data = local_pdata;
+
/* CT critcal temperature event. line 0 */
if (client->irq) {
ret = request_threaded_irq(client->irq,