Colin Pitrat 87041a58d3 gpio: sch: Fix Oops on module load on Asus Eee PC 1201
This fixes the issue descirbe in bug 117531
(https://bugzilla.kernel.org/show_bug.cgi?id=117531).
It's a regression introduced in linux 4.5 that causes a Oops at load of
gpio_sch and prevents powering off the computer.

The issue is that sch_gpio_reg_set is called in sch_gpio_probe before
gpio_chip data is initialized with the pointer to the sch_gpio struct. As
sch_gpio_reg_set calls gpiochip_get_data, it returns NULL which causes
the Oops.

The patch follows Mika's advice (https://lkml.org/lkml/2016/5/9/61) and
consists in modifying sch_gpio_reg_get and sch_gpio_reg_set to take a
sch_gpio struct directly instead of a gpio_chip, which avoids the call to
gpiochip_get_data.

Thanks Mika for your patience with me :-)

Cc: stable@vger.kernel.org
Signed-off-by: Colin Pitrat <colin.pitrat@gmail.com>
Acked-by: Alexandre Courbot <acourbot@nvidia.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-07-04 16:50:40 +02:00
..
2016-07-01 15:31:48 -07:00
2016-05-31 11:52:59 -07:00
2016-06-18 06:04:01 -10:00
2016-05-24 11:00:20 -07:00
2016-05-19 11:27:09 -07:00
2016-05-31 22:17:05 +05:30
2016-06-09 22:38:16 +02:00
2016-05-18 16:38:59 -07:00
2016-06-23 00:29:32 +02:00
2016-06-09 14:28:28 -06:00
2016-05-27 15:26:11 -07:00
2016-06-15 09:51:35 +01:00
2016-05-20 21:26:15 -07:00
2016-05-29 22:32:27 -07:00
2016-05-26 19:34:26 -07:00
2016-05-20 18:33:37 -07:00
2016-05-31 21:25:52 -06:00
2016-05-10 01:19:26 -07:00
2016-05-31 08:20:43 +03:00
2016-05-23 11:18:01 -07:00