hwmon: (pc87427) Use request_muxed_region for Super-IO accesses
authorGuenter Roeck <linux@roeck-us.net>
Thu, 4 Apr 2019 18:16:20 +0000 (11:16 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 16 Apr 2019 00:19:53 +0000 (17:19 -0700)
commit755a9b0f8aaa5639ba5671ca50080852babb89ce
tree6958c6737518debed2b2dad91a2181401edddb13
parent73e6ff71a7ea924fb7121d576a2d41e3be3fc6b5
hwmon: (pc87427) Use request_muxed_region for Super-IO accesses

Super-IO accesses may fail on a system with no or unmapped LPC bus.

Also, other drivers may attempt to access the LPC bus at the same time,
resulting in undefined behavior.

Use request_muxed_region() to ensure that IO access on the requested
address space is supported, and to ensure that access by multiple drivers
is synchronized.

Fixes: ba224e2c4f0a7 ("hwmon: New PC87427 hardware monitoring driver")
Reported-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Reported-by: John Garry <john.garry@huawei.com>
Cc: John Garry <john.garry@huawei.com>
Acked-by: John Garry <john.garry@huawei.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pc87427.c