diff options
author | Jiri Kosina <jkosina@suse.cz> | 2008-06-04 04:26:59 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2008-06-04 04:26:59 -0400 |
commit | f38bb7de289f5c15e287386d35e9c325f1062c49 (patch) | |
tree | 38e69a9ecea18243e3f66bcf51bc89cd7b8f0c94 /drivers/gpio | |
parent | 2d4b3f37ded8998a362c8d0b4be02f583dd9a002 (diff) | |
parent | c3b25b32e8bef526cca748e1ba023c6bdd705a99 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpiolib.c | 6 | ||||
-rw-r--r-- | drivers/gpio/mcp23s08.c | 2 | ||||
-rw-r--r-- | drivers/gpio/pca953x.c | 1 |
3 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 7f138c6195f..beaf6b3a37d 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c | |||
@@ -127,7 +127,7 @@ int __init gpiochip_reserve(int start, int ngpio) | |||
127 | unsigned long flags; | 127 | unsigned long flags; |
128 | int i; | 128 | int i; |
129 | 129 | ||
130 | if (!gpio_is_valid(start) || !gpio_is_valid(start + ngpio)) | 130 | if (!gpio_is_valid(start) || !gpio_is_valid(start + ngpio - 1)) |
131 | return -EINVAL; | 131 | return -EINVAL; |
132 | 132 | ||
133 | spin_lock_irqsave(&gpio_lock, flags); | 133 | spin_lock_irqsave(&gpio_lock, flags); |
@@ -170,7 +170,7 @@ int gpiochip_add(struct gpio_chip *chip) | |||
170 | unsigned id; | 170 | unsigned id; |
171 | int base = chip->base; | 171 | int base = chip->base; |
172 | 172 | ||
173 | if ((!gpio_is_valid(base) || !gpio_is_valid(base + chip->ngpio)) | 173 | if ((!gpio_is_valid(base) || !gpio_is_valid(base + chip->ngpio - 1)) |
174 | && base >= 0) { | 174 | && base >= 0) { |
175 | status = -EINVAL; | 175 | status = -EINVAL; |
176 | goto fail; | 176 | goto fail; |
@@ -207,7 +207,7 @@ fail: | |||
207 | /* failures here can mean systems won't boot... */ | 207 | /* failures here can mean systems won't boot... */ |
208 | if (status) | 208 | if (status) |
209 | pr_err("gpiochip_add: gpios %d..%d (%s) not registered\n", | 209 | pr_err("gpiochip_add: gpios %d..%d (%s) not registered\n", |
210 | chip->base, chip->base + chip->ngpio, | 210 | chip->base, chip->base + chip->ngpio - 1, |
211 | chip->label ? : "generic"); | 211 | chip->label ? : "generic"); |
212 | return status; | 212 | return status; |
213 | } | 213 | } |
diff --git a/drivers/gpio/mcp23s08.c b/drivers/gpio/mcp23s08.c index 7fb5b9d009d..7f92fdd5f0e 100644 --- a/drivers/gpio/mcp23s08.c +++ b/drivers/gpio/mcp23s08.c | |||
@@ -168,7 +168,7 @@ static void mcp23s08_dbg_show(struct seq_file *s, struct gpio_chip *chip) | |||
168 | { | 168 | { |
169 | struct mcp23s08 *mcp; | 169 | struct mcp23s08 *mcp; |
170 | char bank; | 170 | char bank; |
171 | unsigned t; | 171 | int t; |
172 | unsigned mask; | 172 | unsigned mask; |
173 | 173 | ||
174 | mcp = container_of(chip, struct mcp23s08, chip); | 174 | mcp = container_of(chip, struct mcp23s08, chip); |
diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c index 93f916720b1..7e40e8a55ed 100644 --- a/drivers/gpio/pca953x.c +++ b/drivers/gpio/pca953x.c | |||
@@ -30,6 +30,7 @@ static const struct i2c_device_id pca953x_id[] = { | |||
30 | { "pca9537", 4, }, | 30 | { "pca9537", 4, }, |
31 | { "pca9538", 8, }, | 31 | { "pca9538", 8, }, |
32 | { "pca9539", 16, }, | 32 | { "pca9539", 16, }, |
33 | { "pca9554", 8, }, | ||
33 | { "pca9555", 16, }, | 34 | { "pca9555", 16, }, |
34 | { "pca9557", 8, }, | 35 | { "pca9557", 8, }, |
35 | /* REVISIT several pca955x parts should work here too */ | 36 | /* REVISIT several pca955x parts should work here too */ |