]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
hwmon: (vt1211) Use request_muxed_region for Super-IO accesses
authorGuenter Roeck <linux@roeck-us.net>
Fri, 5 Apr 2019 15:53:08 +0000 (08:53 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 May 2019 13:48:23 +0000 (06:48 -0700)
commitf418d00bc5c3527d6ffed0a4073be77f000252c1
tree6c5a2894460ccdb3a76c0d0d08330ce3bc083820
parent3b82ce17cea914ffc53ba15ae7c6f542d4ec6d9c
hwmon: (vt1211) Use request_muxed_region for Super-IO accesses

[ Upstream commit 14b97ba5c20056102b3dd22696bf17b057e60976 ]

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: 2219cd81a6cd ("hwmon/vt1211: Add probing of alternate config index port")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hwmon/vt1211.c