提交 49fb88af 编写于 作者: M Marek Szyprowski 提交者: Ben Dooks

[ARM] S3C: Fix gpio-config off-by-one bug

Fix gpio-config off-by-one bug. Without this patch, touching GPA0 pin on
S3C64XX platform causes kernel oops.
Reviewed-by: NKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: NBen Dooks <ben-linux@fluff.org>
上级 0b495737
...@@ -119,7 +119,7 @@ int s3c_gpio_setcfg_s3c64xx_4bit(struct s3c_gpio_chip *chip, ...@@ -119,7 +119,7 @@ int s3c_gpio_setcfg_s3c64xx_4bit(struct s3c_gpio_chip *chip,
unsigned int shift = (off & 7) * 4; unsigned int shift = (off & 7) * 4;
u32 con; u32 con;
if (off < 8 && chip->chip.ngpio >= 8) if (off < 8 && chip->chip.ngpio > 8)
reg -= 4; reg -= 4;
if (s3c_gpio_is_cfg_special(cfg)) { if (s3c_gpio_is_cfg_special(cfg)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册