aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-12-07 11:23:58 -0500
committerGrant Likely <grant.likely@secretlab.ca>2012-01-02 02:25:43 -0500
commit2985479f198c6bceded56fa5cf51457a8d273513 (patch)
tree8bf8196d815aeeeb9778a5062765354a2cf4e3c1 /drivers/gpio
parent15182f636417e24fbcd464369fe73e966550e95f (diff)
gpio: Explicitly index samsung_gpio_cfgs
Make it easier to follow the by number references into samsung_gpio_cfgs by putting the indexes into the code initialising the array, improving readability a bit. Ideally we wouldn't be using magic array indexes at all but this is easier than coming up with a better way. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-samsung.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c
index 866251852719..42bb1cd99288 100644
--- a/drivers/gpio/gpio-samsung.c
+++ b/drivers/gpio/gpio-samsung.c
@@ -467,33 +467,42 @@ static struct samsung_gpio_cfg s5p64x0_gpio_cfg_rbank = {
467#endif 467#endif
468 468
469static struct samsung_gpio_cfg samsung_gpio_cfgs[] = { 469static struct samsung_gpio_cfg samsung_gpio_cfgs[] = {
470 { 470 [0] = {
471 .cfg_eint = 0x0, 471 .cfg_eint = 0x0,
472 }, { 472 },
473 [1] = {
473 .cfg_eint = 0x3, 474 .cfg_eint = 0x3,
474 }, { 475 },
476 [2] = {
475 .cfg_eint = 0x7, 477 .cfg_eint = 0x7,
476 }, { 478 },
479 [3] = {
477 .cfg_eint = 0xF, 480 .cfg_eint = 0xF,
478 }, { 481 },
482 [4] = {
479 .cfg_eint = 0x0, 483 .cfg_eint = 0x0,
480 .set_config = samsung_gpio_setcfg_2bit, 484 .set_config = samsung_gpio_setcfg_2bit,
481 .get_config = samsung_gpio_getcfg_2bit, 485 .get_config = samsung_gpio_getcfg_2bit,
482 }, { 486 },
487 [5] = {
483 .cfg_eint = 0x2, 488 .cfg_eint = 0x2,
484 .set_config = samsung_gpio_setcfg_2bit, 489 .set_config = samsung_gpio_setcfg_2bit,
485 .get_config = samsung_gpio_getcfg_2bit, 490 .get_config = samsung_gpio_getcfg_2bit,
486 }, { 491 },
492 [6] = {
487 .cfg_eint = 0x3, 493 .cfg_eint = 0x3,
488 .set_config = samsung_gpio_setcfg_2bit, 494 .set_config = samsung_gpio_setcfg_2bit,
489 .get_config = samsung_gpio_getcfg_2bit, 495 .get_config = samsung_gpio_getcfg_2bit,
490 }, { 496 },
497 [7] = {
491 .set_config = samsung_gpio_setcfg_2bit, 498 .set_config = samsung_gpio_setcfg_2bit,
492 .get_config = samsung_gpio_getcfg_2bit, 499 .get_config = samsung_gpio_getcfg_2bit,
493 }, { 500 },
501 [8] = {
494 .set_pull = exynos4_gpio_setpull, 502 .set_pull = exynos4_gpio_setpull,
495 .get_pull = exynos4_gpio_getpull, 503 .get_pull = exynos4_gpio_getpull,
496 }, { 504 },
505 [9] = {
497 .cfg_eint = 0x3, 506 .cfg_eint = 0x3,
498 .set_pull = exynos4_gpio_setpull, 507 .set_pull = exynos4_gpio_setpull,
499 .get_pull = exynos4_gpio_getpull, 508 .get_pull = exynos4_gpio_getpull,