summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-max730x.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2012-11-26 15:48:53 +0530
committerViresh Kumar <viresh.kumar@linaro.org>2012-11-26 15:48:53 +0530
commit53d74fd79db19aae506de892273198b160c2ee95 (patch)
treef6abab77c62d4931c09b8dffff2bc871d809a500 /drivers/gpio/gpio-max730x.c
parent22595e28157e9a55f285a4971bd1d43b8457ffd5 (diff)
parentb53bc2819a71099ecfc3d61ba0796b3dcc6be321 (diff)
downloadlinux-53d74fd79db19aae506de892273198b160c2ee95.tar.bz2
Merge commit 'gpio-lw/devel' into spear-for-3.8
This merges dependency branch gpio-lw/devel for SPEAr DT updates.
Diffstat (limited to 'drivers/gpio/gpio-max730x.c')
-rw-r--r--drivers/gpio/gpio-max730x.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpio/gpio-max730x.c b/drivers/gpio/gpio-max730x.c
index 05e2dac60b3b..c4bf86abd4d8 100644
--- a/drivers/gpio/gpio-max730x.c
+++ b/drivers/gpio/gpio-max730x.c
@@ -167,10 +167,6 @@ int __devinit __max730x_probe(struct max7301 *ts)
int i, ret;
pdata = dev->platform_data;
- if (!pdata || !pdata->base) {
- dev_err(dev, "incorrect or missing platform data\n");
- return -EINVAL;
- }
mutex_init(&ts->lock);
dev_set_drvdata(dev, ts);
@@ -178,7 +174,12 @@ int __devinit __max730x_probe(struct max7301 *ts)
/* Power up the chip and disable IRQ output */
ts->write(dev, 0x04, 0x01);
- ts->input_pullup_active = pdata->input_pullup_active;
+ if (pdata) {
+ ts->input_pullup_active = pdata->input_pullup_active;
+ ts->chip.base = pdata->base;
+ } else {
+ ts->chip.base = -1;
+ }
ts->chip.label = dev->driver->name;
ts->chip.direction_input = max7301_direction_input;
@@ -186,7 +187,6 @@ int __devinit __max730x_probe(struct max7301 *ts)
ts->chip.direction_output = max7301_direction_output;
ts->chip.set = max7301_set;
- ts->chip.base = pdata->base;
ts->chip.ngpio = PIN_NUMBER;
ts->chip.can_sleep = 1;
ts->chip.dev = dev;