diff options
author | Lad, Prabhakar <prabhakar.csengg@gmail.com> | 2013-11-08 12:15:56 +0530 |
---|---|---|
committer | Sekhar Nori <nsekhar@ti.com> | 2013-11-21 20:13:28 +0530 |
commit | e462f1f5174893f3f5efd03a31ca014b02120f9a (patch) | |
tree | 64f1a18a6db51faabe1810fdda08133838c7553d /arch/arm/mach-davinci/dm355.c | |
parent | 34af1ab4a2cc97721a00fce19d9fbafd9ff4b300 (diff) | |
download | op-kernel-dev-e462f1f5174893f3f5efd03a31ca014b02120f9a.zip op-kernel-dev-e462f1f5174893f3f5efd03a31ca014b02120f9a.tar.gz |
ARM: davinci: fix number of resources passed to davinci_gpio_register()
The davinci_gpio_register() function expects the number of
resources as the second parameter, but sizeof() resources
was passed to it due to which it was causing unexpected
behaviour. This patch fixes the same by passing the
ARRAY_SIZE() of resources.
Reported-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Diffstat (limited to 'arch/arm/mach-davinci/dm355.c')
-rw-r--r-- | arch/arm/mach-davinci/dm355.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c index ef9ff1f..536ce52 100644 --- a/arch/arm/mach-davinci/dm355.c +++ b/arch/arm/mach-davinci/dm355.c @@ -906,7 +906,7 @@ static struct davinci_gpio_platform_data dm355_gpio_platform_data = { int __init dm355_gpio_register(void) { return davinci_gpio_register(dm355_gpio_resources, - sizeof(dm355_gpio_resources), + ARRAY_SIZE(dm355_gpio_resources), &dm355_gpio_platform_data); } /*----------------------------------------------------------------------*/ |