]> www.infradead.org Git - users/dwmw2/linux.git/commit
hwmon: (smsc47m1) Use request_muxed_region for Super-IO accesses
authorGuenter Roeck <linux@roeck-us.net>
Thu, 4 Apr 2019 18:28:37 +0000 (11:28 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 23 Sep 2019 20:11:42 +0000 (21:11 +0100)
commitbe8d00bf3cb38bbdd6fe103a298deb4d58bb8d76
treef42e558b851ef8445d49f7109cb0d3e741f3ceea
parenta9691f376d8800cdebc7a1bf9a492292caafd518
hwmon: (smsc47m1) Use request_muxed_region for Super-IO accesses

commit d6410408ad2a798c4cc685252c1baa713be0ad69 upstream.

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: 8d5d45fb1468 ("I2C: Move hwmon drivers (2/3)")
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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/hwmon/smsc47m1.c