aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/pcf857x.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-21 16:37:27 +0100
committerIngo Molnar <mingo@elte.hu>2009-01-21 16:37:27 +0100
commit77835492ed489c0b870f82f4c50687bd267acc0a (patch)
treed80903ce1b8dd30aa44ccfc756616ad4d6c74d63 /drivers/gpio/pcf857x.c
parentMerge branch 'core/percpu' into perfcounters/core (diff)
parentLinux 2.6.29-rc2 (diff)
downloadlinux-dev-77835492ed489c0b870f82f4c50687bd267acc0a.tar.xz
linux-dev-77835492ed489c0b870f82f4c50687bd267acc0a.zip
Merge commit 'v2.6.29-rc2' into perfcounters/core
Conflicts: include/linux/syscalls.h
Diffstat (limited to 'drivers/gpio/pcf857x.c')
-rw-r--r--drivers/gpio/pcf857x.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpio/pcf857x.c b/drivers/gpio/pcf857x.c
index 4bc2070dd4a1..9525724be731 100644
--- a/drivers/gpio/pcf857x.c
+++ b/drivers/gpio/pcf857x.c
@@ -188,8 +188,10 @@ static int pcf857x_probe(struct i2c_client *client,
int status;
pdata = client->dev.platform_data;
- if (!pdata)
- return -ENODEV;
+ if (!pdata) {
+ dev_dbg(&client->dev, "no platform data\n");
+ return -EINVAL;
+ }
/* Allocate, initialize, and register this gpio_chip. */
gpio = kzalloc(sizeof *gpio, GFP_KERNEL);
@@ -248,8 +250,10 @@ static int pcf857x_probe(struct i2c_client *client,
else
status = i2c_read_le16(client);
- } else
- status = -ENODEV;
+ } else {
+ dev_dbg(&client->dev, "unsupported number of gpios\n");
+ status = -EINVAL;
+ }
if (status < 0)
goto fail;