]> err.no Git - linux-2.6/commitdiff
Blackfin arch: extract gpio number from PIN function
authorMichael Hennerich <michael.hennerich@analog.com>
Mon, 27 Aug 2007 08:46:17 +0000 (16:46 +0800)
committerBryan Wu <bryan.wu@analog.com>
Mon, 27 Aug 2007 08:46:17 +0000 (16:46 +0800)
Singed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
arch/blackfin/kernel/bfin_gpio.c

index d9284d7dc9fc824a25355c6674bb9962258c7c41..0d1e87b9c93d2169f8f87ccc07beae7369703f16 100644 (file)
@@ -902,7 +902,9 @@ EXPORT_SYMBOL(gpio_direction_output);
  */
 void bfin_gpio_reset_spi0_ssel1(void)
 {
-       port_setup(P_SPI0_SSEL1, GPIO_USAGE);
-       gpio_bankb[gpio_bank(P_SPI0_SSEL1)]->data_set = gpio_bit(P_SPI0_SSEL1);
+       u16 gpio = P_IDENT(P_SPI0_SSEL1);
+
+       port_setup(gpio, GPIO_USAGE);
+       gpio_bankb[gpio_bank(gpio)]->data_set = gpio_bit(gpio);
        udelay(1);
 }