Skip to content
Commit a28e3517 authored by Jean Delvare's avatar Jean Delvare Committed by Wolfram Sang
Browse files

i2c: piix4: Fix SB800 locking



We need a single mutex for all 4 shared SMBus ports on the SB800. A
per-port mutex doesn't protect us from concurrent access.

In theory the mutex should be per PCI device, however in practice we
know that there's only ever a single instance of the device in a given
system so we can use a global.

Also take the mutex during initialization, as first port may be already
in use when second port is initialized.

Signed-off-by: default avatarJean Delvare <jdelvare@suse.de>
Tested-by: default avatarChristian Fetzer <fetzer.ch@gmail.com>
Reviewed-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
[wsa: made mutex static]
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 92e963f5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment