aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-01-09 15:50:33 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-01-09 15:50:33 -0500
commit756a7334f2b8a7fee56c221580ce75e2eb182d62 (patch)
tree98974d51f952d9a74f2cfa4fab235e9ce91fbc99
parentc92f5bdc4b9ba509a93f9e386fbb1fa779d4b0d6 (diff)
parent5018ada69a04c8ac21d74bd682fceb8e42dc0f96 (diff)
Merge tag 'gpio-v4.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
Pull GPIO fixes from Linus Walleij: - move freeing of GPIO hogs to after freeing the device to get rid of a warning state. - a small compile warning fix * tag 'gpio-v4.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: Move freeing of GPIO hogs before numbing of the device gpio: mxs: remove __init annotation
-rw-r--r--drivers/gpio/gpio-mxs.c2
-rw-r--r--drivers/gpio/gpiolib.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-mxs.c b/drivers/gpio/gpio-mxs.c
index 1e8fde8cb803..2292742eac8f 100644
--- a/drivers/gpio/gpio-mxs.c
+++ b/drivers/gpio/gpio-mxs.c
@@ -205,7 +205,7 @@ static int mxs_gpio_set_wake_irq(struct irq_data *d, unsigned int enable)
205 return 0; 205 return 0;
206} 206}
207 207
208static int __init mxs_gpio_init_gc(struct mxs_gpio_port *port, int irq_base) 208static int mxs_gpio_init_gc(struct mxs_gpio_port *port, int irq_base)
209{ 209{
210 struct irq_chip_generic *gc; 210 struct irq_chip_generic *gc;
211 struct irq_chip_type *ct; 211 struct irq_chip_type *ct;
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index f4c26c7826cd..86bf3b84ada5 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1317,12 +1317,12 @@ void gpiochip_remove(struct gpio_chip *chip)
1317 1317
1318 /* FIXME: should the legacy sysfs handling be moved to gpio_device? */ 1318 /* FIXME: should the legacy sysfs handling be moved to gpio_device? */
1319 gpiochip_sysfs_unregister(gdev); 1319 gpiochip_sysfs_unregister(gdev);
1320 gpiochip_free_hogs(chip);
1320 /* Numb the device, cancelling all outstanding operations */ 1321 /* Numb the device, cancelling all outstanding operations */
1321 gdev->chip = NULL; 1322 gdev->chip = NULL;
1322 gpiochip_irqchip_remove(chip); 1323 gpiochip_irqchip_remove(chip);
1323 acpi_gpiochip_remove(chip); 1324 acpi_gpiochip_remove(chip);
1324 gpiochip_remove_pin_ranges(chip); 1325 gpiochip_remove_pin_ranges(chip);
1325 gpiochip_free_hogs(chip);
1326 of_gpiochip_remove(chip); 1326 of_gpiochip_remove(chip);
1327 /* 1327 /*
1328 * We accept no more calls into the driver from this point, so 1328 * We accept no more calls into the driver from this point, so