aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-pca953x.c
diff options
context:
space:
mode:
authorBartosz Golaszewski <bgolaszewski@baylibre.com>2016-09-09 05:17:37 -0400
committerLinus Walleij <linus.walleij@linaro.org>2016-09-12 08:48:38 -0400
commit60f547be82acd3ab5369caf981280a2f13b403e9 (patch)
treee3c71f23ece7409e3e9a16affa1580d205af5b3b /drivers/gpio/gpio-pca953x.c
parentc6e3cf01d31d88d35a8fbf8bf4773b737fa48f21 (diff)
gpio: pca953x: remove an unused variable
The chip_type variable in struct pca953x_chip is no longer required. Remove it. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-pca953x.c')
-rw-r--r--drivers/gpio/gpio-pca953x.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index e7bf3b3cebcd..e36a9bf08fb1 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -130,7 +130,6 @@ struct pca953x_chip {
130 struct i2c_client *client; 130 struct i2c_client *client;
131 struct gpio_chip gpio_chip; 131 struct gpio_chip gpio_chip;
132 const char *const *names; 132 const char *const *names;
133 int chip_type;
134 unsigned long driver_data; 133 unsigned long driver_data;
135 struct regulator *regulator; 134 struct regulator *regulator;
136 135
@@ -791,8 +790,6 @@ static int pca953x_probe(struct i2c_client *client,
791 } 790 }
792 } 791 }
793 792
794 chip->chip_type = PCA_CHIP_TYPE(chip->driver_data);
795
796 mutex_init(&chip->i2c_lock); 793 mutex_init(&chip->i2c_lock);
797 794
798 /* initialize cached registers from their original values. 795 /* initialize cached registers from their original values.
@@ -814,7 +811,7 @@ static int pca953x_probe(struct i2c_client *client,
814 chip->read_regs = pca953x_read_regs_16; 811 chip->read_regs = pca953x_read_regs_16;
815 } 812 }
816 813
817 if (chip->chip_type == PCA953X_TYPE) 814 if (PCA_CHIP_TYPE(chip->driver_data) == PCA953X_TYPE)
818 ret = device_pca953x_init(chip, invert); 815 ret = device_pca953x_init(chip, invert);
819 else 816 else
820 ret = device_pca957x_init(chip, invert); 817 ret = device_pca957x_init(chip, invert);