Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: pca953x: Utilise temporary variable for struct gpio_chip

We have a temporary variable to keep pointer to struct gpio_chip.
Utilise it where it makes sense.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

authored by

Andy Shevchenko and committed by
Bartosz Golaszewski
9da0a75e 6811886a

+3 -4
+3 -4
drivers/gpio/gpio-pca953x.c
··· 680 680 681 681 static void pca953x_setup_gpio(struct pca953x_chip *chip, int gpios) 682 682 { 683 - struct gpio_chip *gc; 684 - 685 - gc = &chip->gpio_chip; 683 + struct gpio_chip *gc = &chip->gpio_chip; 686 684 687 685 gc->direction_input = pca953x_gpio_direction_input; 688 686 gc->direction_output = pca953x_gpio_direction_output; ··· 913 915 struct device *dev = &client->dev; 914 916 DECLARE_BITMAP(reg_direction, MAX_LINE); 915 917 DECLARE_BITMAP(irq_stat, MAX_LINE); 918 + struct gpio_chip *gc = &chip->gpio_chip; 916 919 struct gpio_irq_chip *girq; 917 920 int ret; 918 921 ··· 942 943 * this purpose. 943 944 */ 944 945 pca953x_read_regs(chip, chip->regs->direction, reg_direction); 945 - bitmap_and(chip->irq_stat, irq_stat, reg_direction, chip->gpio_chip.ngpio); 946 + bitmap_and(chip->irq_stat, irq_stat, reg_direction, gc->ngpio); 946 947 mutex_init(&chip->irq_lock); 947 948 948 949 girq = &chip->gpio_chip.irq;