hwmon: (ams) Fix locking issues
commitee4cd32ee8a68e22081f698602e4315fb4272853
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 17 Oct 2008 15:51:12 +0000 (17 17:51 +0200)
committerJean Delvare <khali@mahadeva.delvare>
Fri, 17 Oct 2008 15:51:12 +0000 (17 17:51 +0200)
treee44f309816eeb26727a23180ecede53f372705cd
parent0a02002268bf624a8b0eaf3b4eb5c4207bd80d8b
hwmon: (ams) Fix locking issues

Use a separate mutex to serialize input device creation/removal,
otheriwse we deadlock if we try to remove input device while it is
being polled. Also do not take ams_info.lock when it is not needed.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/hwmon/ams/ams-core.c
drivers/hwmon/ams/ams-i2c.c
drivers/hwmon/ams/ams-input.c
drivers/hwmon/ams/ams-pmu.c