aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/sirf
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2014-04-08 04:59:29 -0400
committerLinus Walleij <linus.walleij@linaro.org>2014-04-23 16:01:17 -0400
commitaef95b691feb44cd98010085295e23f209571b3b (patch)
treed97336cc9a6b6b76dd9ecf88c97092bb457807b6 /drivers/pinctrl/sirf
parent625cb407b85a9e4208f1db5377cc08dd4a0d5387 (diff)
pinctrl: sirf: rename inlined accessor
The sirfsoc_irqchip_to_bank() is obviously misnamed, as it is not converting an irqchip to a bank but converts a gpiochip to a bank so rename it sirfsoc_gpiochip_to_bank(). Acked-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/sirf')
-rw-r--r--drivers/pinctrl/sirf/pinctrl-sirf.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/pinctrl/sirf/pinctrl-sirf.c b/drivers/pinctrl/sirf/pinctrl-sirf.c
index 76502aab2cb1..2c3eb207ff87 100644
--- a/drivers/pinctrl/sirf/pinctrl-sirf.c
+++ b/drivers/pinctrl/sirf/pinctrl-sirf.c
@@ -483,7 +483,7 @@ static inline struct sirfsoc_gpio_bank *sirfsoc_gpio_to_bank(unsigned int gpio)
483 return &sgpio_bank[gpio / SIRFSOC_GPIO_BANK_SIZE]; 483 return &sgpio_bank[gpio / SIRFSOC_GPIO_BANK_SIZE];
484} 484}
485 485
486static inline struct sirfsoc_gpio_bank *sirfsoc_irqchip_to_bank(struct gpio_chip *chip) 486static inline struct sirfsoc_gpio_bank *sirfsoc_gpiochip_to_bank(struct gpio_chip *chip)
487{ 487{
488 return container_of(to_of_mm_gpio_chip(chip), struct sirfsoc_gpio_bank, chip); 488 return container_of(to_of_mm_gpio_chip(chip), struct sirfsoc_gpio_bank, chip);
489} 489}
@@ -675,7 +675,7 @@ static inline void sirfsoc_gpio_set_input(struct sirfsoc_gpio_bank *bank, unsign
675 675
676static int sirfsoc_gpio_request(struct gpio_chip *chip, unsigned offset) 676static int sirfsoc_gpio_request(struct gpio_chip *chip, unsigned offset)
677{ 677{
678 struct sirfsoc_gpio_bank *bank = sirfsoc_irqchip_to_bank(chip); 678 struct sirfsoc_gpio_bank *bank = sirfsoc_gpiochip_to_bank(chip);
679 unsigned long flags; 679 unsigned long flags;
680 680
681 if (pinctrl_request_gpio(chip->base + offset)) 681 if (pinctrl_request_gpio(chip->base + offset))
@@ -697,7 +697,7 @@ static int sirfsoc_gpio_request(struct gpio_chip *chip, unsigned offset)
697 697
698static void sirfsoc_gpio_free(struct gpio_chip *chip, unsigned offset) 698static void sirfsoc_gpio_free(struct gpio_chip *chip, unsigned offset)
699{ 699{
700 struct sirfsoc_gpio_bank *bank = sirfsoc_irqchip_to_bank(chip); 700 struct sirfsoc_gpio_bank *bank = sirfsoc_gpiochip_to_bank(chip);
701 unsigned long flags; 701 unsigned long flags;
702 702
703 spin_lock_irqsave(&bank->lock, flags); 703 spin_lock_irqsave(&bank->lock, flags);
@@ -712,7 +712,7 @@ static void sirfsoc_gpio_free(struct gpio_chip *chip, unsigned offset)
712 712
713static int sirfsoc_gpio_direction_input(struct gpio_chip *chip, unsigned gpio) 713static int sirfsoc_gpio_direction_input(struct gpio_chip *chip, unsigned gpio)
714{ 714{
715 struct sirfsoc_gpio_bank *bank = sirfsoc_irqchip_to_bank(chip); 715 struct sirfsoc_gpio_bank *bank = sirfsoc_gpiochip_to_bank(chip);
716 int idx = sirfsoc_gpio_to_offset(gpio); 716 int idx = sirfsoc_gpio_to_offset(gpio);
717 unsigned long flags; 717 unsigned long flags;
718 unsigned offset; 718 unsigned offset;
@@ -751,7 +751,7 @@ static inline void sirfsoc_gpio_set_output(struct sirfsoc_gpio_bank *bank, unsig
751 751
752static int sirfsoc_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, int value) 752static int sirfsoc_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, int value)
753{ 753{
754 struct sirfsoc_gpio_bank *bank = sirfsoc_irqchip_to_bank(chip); 754 struct sirfsoc_gpio_bank *bank = sirfsoc_gpiochip_to_bank(chip);
755 int idx = sirfsoc_gpio_to_offset(gpio); 755 int idx = sirfsoc_gpio_to_offset(gpio);
756 u32 offset; 756 u32 offset;
757 unsigned long flags; 757 unsigned long flags;
@@ -769,7 +769,7 @@ static int sirfsoc_gpio_direction_output(struct gpio_chip *chip, unsigned gpio,
769 769
770static int sirfsoc_gpio_get_value(struct gpio_chip *chip, unsigned offset) 770static int sirfsoc_gpio_get_value(struct gpio_chip *chip, unsigned offset)
771{ 771{
772 struct sirfsoc_gpio_bank *bank = sirfsoc_irqchip_to_bank(chip); 772 struct sirfsoc_gpio_bank *bank = sirfsoc_gpiochip_to_bank(chip);
773 u32 val; 773 u32 val;
774 unsigned long flags; 774 unsigned long flags;
775 775
@@ -785,7 +785,7 @@ static int sirfsoc_gpio_get_value(struct gpio_chip *chip, unsigned offset)
785static void sirfsoc_gpio_set_value(struct gpio_chip *chip, unsigned offset, 785static void sirfsoc_gpio_set_value(struct gpio_chip *chip, unsigned offset,
786 int value) 786 int value)
787{ 787{
788 struct sirfsoc_gpio_bank *bank = sirfsoc_irqchip_to_bank(chip); 788 struct sirfsoc_gpio_bank *bank = sirfsoc_gpiochip_to_bank(chip);
789 u32 ctrl; 789 u32 ctrl;
790 unsigned long flags; 790 unsigned long flags;
791 791