Geert Uytterhoeven
5018ada69a
gpio: Move freeing of GPIO hogs before numbing of the device
...
When removing a gpiochip that uses GPIO hogging (e.g. by unloading the
chip's DT overlay), a warning is printed:
gpio gpiochip8: REMOVING GPIOCHIP WITH GPIOS STILL REQUESTED
This happens because gpiochip_free_hogs() is called after the gdev->chip
pointer is reset to NULL. Hence __gpiod_free() cannot determine the
chip in use, and cannot clear flags nor call the optional chip-specific
.free() callback.
Move the call to gpiochip_free_hogs() up to fix this.
Cc: stable@vger.kernel.org
Fixes: ff2b135922 ("gpio: make the gpiochip a real device")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org >
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
2016-12-30 09:11:21 +01:00
..
2016-06-23 11:07:12 +02:00
2016-06-13 14:48:10 +02:00
2016-11-25 15:12:27 +01:00
2016-10-25 13:58:42 +02:00
2016-09-15 14:00:47 +02:00
2016-12-07 15:23:38 +01:00
2016-09-23 15:11:09 +02:00
2016-10-24 00:23:05 +02:00
2016-11-24 16:19:02 +01:00
2016-09-13 10:35:56 +02:00
2016-11-25 15:12:27 +01:00
2016-09-13 10:35:56 +02:00
2016-09-13 10:35:56 +02:00
2016-11-09 09:13:35 +01:00
2016-11-25 15:12:27 +01:00
2016-07-22 15:30:42 +02:00
2016-11-22 10:14:22 +01:00
2016-09-18 13:35:06 +02:00
2016-08-11 13:37:25 +02:00
2016-11-13 11:50:22 +01:00
2016-11-15 10:34:47 +01:00
2016-09-12 15:28:18 +02:00
2016-09-13 10:35:56 +02:00
2016-09-23 15:10:00 +02:00
2016-09-13 10:35:56 +02:00
2016-09-13 10:35:56 +02:00
2016-09-12 14:23:37 +02:00
2016-06-23 11:07:14 +02:00
2016-08-10 15:40:44 +02:00
2016-11-25 15:12:27 +01:00
2016-11-16 20:52:13 +01:00
2016-11-22 10:16:17 +01:00
2016-11-25 15:12:27 +01:00
2016-12-07 15:23:40 +01:00
2016-08-11 16:17:05 +02:00
2016-09-26 11:47:14 -07:00
2016-10-24 02:20:40 +02:00
2016-08-23 11:22:09 +02:00
2016-11-01 19:31:49 +01:00
2016-10-05 11:49:09 -07:00
2016-12-30 09:02:51 +01:00
2016-09-15 13:57:43 +02:00
2016-12-13 07:54:57 -08:00
2016-11-25 15:12:27 +01:00
2016-09-13 10:35:56 +02:00
2016-12-07 15:22:50 +01:00
2016-09-08 01:15:46 +02:00
2016-09-08 00:42:57 +02:00
2016-09-13 10:35:56 +02:00
2016-08-23 11:23:41 +02:00
2016-12-13 07:54:57 -08:00
2016-12-13 07:54:57 -08:00
2016-06-22 17:58:07 +02:00
2016-09-13 10:35:56 +02:00
2016-09-13 10:35:56 +02:00
2016-10-26 10:30:02 +01:00
2016-09-13 10:35:56 +02:00
2016-10-21 14:55:07 +02:00
2016-09-13 10:35:56 +02:00
2016-09-13 10:35:56 +02:00
2016-11-24 16:19:02 +01:00
2016-11-25 15:12:27 +01:00
2016-09-13 10:35:56 +02:00
2016-09-13 10:35:56 +02:00
2016-09-13 10:35:56 +02:00
2016-09-23 15:26:20 +02:00
2016-12-13 07:54:57 -08:00
2016-10-25 20:23:19 +02:00
2016-07-04 16:51:29 +02:00
2016-12-13 07:54:57 -08:00
2016-09-12 14:53:33 +02:00
2016-12-30 09:11:21 +01:00
2016-10-24 16:33:11 +02:00
2016-12-13 07:54:57 -08:00
2016-12-13 07:54:57 -08:00