i2c: Prevent priority inversion on top of bus lock
authorMika Kuoppala <mika.kuoppala@nokia.com>
Sun, 6 Dec 2009 16:06:22 +0000 (17:06 +0100)
committerJean Delvare <khali@linux-fr.org>
Sun, 6 Dec 2009 16:06:22 +0000 (17:06 +0100)
commit194684e596af4bdaebb424166d94a8aa528edfda
tree1a6b0ede432e8c9fb4f7a1652deb71044ff9aa50
parenta0c11cdd6a1975fd8d6d186f2e2865a82f3e9bbf
i2c: Prevent priority inversion on top of bus lock

Low priority thread holding the i2c bus mutex could block higher
priority threads to access the bus resulting in unacceptable
latencies. Change the mutex type to rt_mutex preventing priority
inversion.

Tested-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@nokia.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/i2c/Kconfig
drivers/i2c/i2c-core.c
include/linux/i2c.h