mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/4] gpio: Explicitly index samsung_gpio_cfgs
@ 2011-12-21  0:20 Mark Brown
  2011-12-21  0:20 ` [PATCH 2/4] gpio: Fix typo in comment in Samsung driver Mark Brown
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Mark Brown @ 2011-12-21  0:20 UTC (permalink / raw)
  To: Linus Walleij, Grant Likely; +Cc: linux-kernel, Mark Brown

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>
---
 drivers/gpio/gpio-samsung.c |   29 +++++++++++++++++++----------
 1 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c
index 6b4d23f..f1c1ecd 100644
--- a/drivers/gpio/gpio-samsung.c
+++ b/drivers/gpio/gpio-samsung.c
@@ -470,33 +470,42 @@ static struct samsung_gpio_cfg s5p64x0_gpio_cfg_rbank = {
 #endif
 
 static struct samsung_gpio_cfg samsung_gpio_cfgs[] = {
-	{
+	[0] = {
 		.cfg_eint	= 0x0,
-	}, {
+	},
+	[1] = {
 		.cfg_eint	= 0x3,
-	}, {
+	},
+	[2] = {
 		.cfg_eint	= 0x7,
-	}, {
+	},
+	[3] = {
 		.cfg_eint	= 0xF,
-	}, {
+	},
+	[4] = {
 		.cfg_eint	= 0x0,
 		.set_config	= samsung_gpio_setcfg_2bit,
 		.get_config	= samsung_gpio_getcfg_2bit,
-	}, {
+	},
+	[5] = {
 		.cfg_eint	= 0x2,
 		.set_config	= samsung_gpio_setcfg_2bit,
 		.get_config	= samsung_gpio_getcfg_2bit,
-	}, {
+	},
+	[6] = {
 		.cfg_eint	= 0x3,
 		.set_config	= samsung_gpio_setcfg_2bit,
 		.get_config	= samsung_gpio_getcfg_2bit,
-	}, {
+	},
+	[7] = {
 		.set_config	= samsung_gpio_setcfg_2bit,
 		.get_config	= samsung_gpio_getcfg_2bit,
-	}, {
+	},
+	[8] = {
 		.set_pull	= exynos4_gpio_setpull,
 		.get_pull	= exynos4_gpio_getpull,
-	}, {
+	},
+	[9] = {
 		.cfg_eint	= 0x3,
 		.set_pull	= exynos4_gpio_setpull,
 		.get_pull	= exynos4_gpio_getpull,
-- 
1.7.7.3


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH 0/4] Random GPIO updates
@ 2011-12-07 16:22 Mark Brown
  2011-12-07 16:23 ` [PATCH 1/4] gpio: Explicitly index samsung_gpio_cfgs Mark Brown
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2011-12-07 16:22 UTC (permalink / raw)
  To: Grant Likely; +Cc: linux-kernel, Kukjin Kim

This is a fairly random selection of updates I've been sitting on for
the gpios, partly built up over your sabbatical but a couple predating
that.  No real theme here except for time.

The following changes since commit 5611cc4572e889b62a7b4c72a413536bf6a9c416:

  Linux 3.2-rc4 (2011-12-01 14:56:01 -0800)

are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git gpio/misc

Mark Brown (4):
      gpio: Explicitly index samsung_gpio_cfgs
      gpio: Fix typo in comment in Samsung driver
      gpio: Convert GPIO drivers to module_platform_driver
      gpio: Add decode of WM8994 GPIO configuration

 drivers/gpio/gpio-adp5520.c    |   12 +------
 drivers/gpio/gpio-cs5535.c     |   13 +------
 drivers/gpio/gpio-da9052.c     |   12 +------
 drivers/gpio/gpio-generic.c    |   12 +------
 drivers/gpio/gpio-janz-ttl.c   |   13 +------
 drivers/gpio/gpio-rdc321x.c    |   13 +------
 drivers/gpio/gpio-samsung.c    |   31 ++++++++++------
 drivers/gpio/gpio-sch.c        |   13 +------
 drivers/gpio/gpio-timberdale.c |   13 +------
 drivers/gpio/gpio-ucb1400.c    |   13 +------
 drivers/gpio/gpio-vr41xx.c     |   13 +------
 drivers/gpio/gpio-vx855.c      |   12 +------
 drivers/gpio/gpio-wm8994.c     |   79 +++++++++++++++++++++++++++++++++++++++-
 13 files changed, 108 insertions(+), 141 deletions(-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-01-02  7:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-21  0:20 [PATCH 1/4] gpio: Explicitly index samsung_gpio_cfgs Mark Brown
2011-12-21  0:20 ` [PATCH 2/4] gpio: Fix typo in comment in Samsung driver Mark Brown
2011-12-21  0:20 ` [PATCH 3/4] gpio: Convert GPIO drivers to module_platform_driver Mark Brown
2011-12-21  0:20 ` [PATCH 4/4] gpio: Add decode of WM8994 GPIO configuration Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2011-12-07 16:22 [PATCH 0/4] Random GPIO updates Mark Brown
2011-12-07 16:23 ` [PATCH 1/4] gpio: Explicitly index samsung_gpio_cfgs Mark Brown
2011-12-07 16:23   ` [PATCH 2/4] gpio: Fix typo in comment in Samsung driver Mark Brown
2011-12-08  0:28     ` Kukjin Kim
2012-01-02  7:27     ` Grant Likely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome