Skip to content

Commit

Permalink
[ARM] S3C: Fix gpio-config off-by-one bug
Browse files Browse the repository at this point in the history
Fix gpio-config off-by-one bug. Without this patch, touching GPA0 pin on
S3C64XX platform causes kernel oops.

Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
  • Loading branch information
Marek Szyprowski authored and Ben Dooks committed Jun 22, 2009
1 parent 0b49573 commit 49fb88a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/plat-s3c/gpio-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ int s3c_gpio_setcfg_s3c64xx_4bit(struct s3c_gpio_chip *chip,
unsigned int shift = (off & 7) * 4;
u32 con;

if (off < 8 && chip->chip.ngpio >= 8)
if (off < 8 && chip->chip.ngpio > 8)
reg -= 4;

if (s3c_gpio_is_cfg_special(cfg)) {
Expand Down

0 comments on commit 49fb88a

Please sign in to comment.