]> git.hungrycats.org Git - linux/commit
hwmon: (w83627hf) Use request_muxed_region for Super-IO accesses
authorGuenter Roeck <linux@roeck-us.net>
Fri, 5 Apr 2019 15:44:41 +0000 (08:44 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 23 Sep 2019 20:11:43 +0000 (21:11 +0100)
commit803a857aab4714009703cc5e5a48603c4881a3c6
tree9bf525863d7e6dd37208f42dee2d7fac319e01df
parentbe8d00bf3cb38bbdd6fe103a298deb4d58bb8d76
hwmon: (w83627hf) Use request_muxed_region for Super-IO accesses

commit e95fd518d05bfc087da6fcdea4900a57cfb083bd 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: b72656dbc491 ("hwmon: (w83627hf) Stop using globals for I/O port numbers")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/hwmon/w83627hf.c