[PATCH] hwmon: add required idr locking
authorMark M. Hoffman <mhoffman@lightlink.com>
Sun, 5 Mar 2006 22:13:47 +0000 (23:13 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 23 Mar 2006 22:21:55 +0000 (14:21 -0800)
commitded2b66615613093eeb83b81499bc270de8fc499
tree118f87f38a4b7a2c8d65f38beb85fa63da78fb4f
parentf6c27fc17c5e575c5471fb344bdbd5f5f6072136
[PATCH] hwmon: add required idr locking

Add required locking around idr_ routines, retry the idr_pre_get/idr_get_new
pair properly, and sprinkle in some likely/unlikely for good measure.

(Lack of idr locking didn't hurt when all callers were I2C clients, as the
i2c-core serialized for us anyway.  Now that we have non I2C hwmon drivers,
this is truly necessary.)

Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/hwmon/hwmon.c