diff options
author | Ben Gardner <bgardner@wabtec.com> | 2006-01-18 22:46:26 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-23 14:21:49 -0800 |
commit | 8a05940d742174a87427a3fe746712d49d4b8c4b (patch) | |
tree | 0dd0fc84a3b2818c75e0b692ba16fd17b57d60c4 /drivers/i2c/busses | |
parent | 9b7b6d3b2b46c5c336a441ed12b504ee192e63b3 (diff) | |
download | linux-8a05940d742174a87427a3fe746712d49d4b8c4b.tar.gz linux-8a05940d742174a87427a3fe746712d49d4b8c4b.tar.bz2 linux-8a05940d742174a87427a3fe746712d49d4b8c4b.zip |
[PATCH] i2c: scx200_acb remove use of lock_kernel
scx200_acb: remove use of lock_kernel()
Signed-off-by: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/i2c/busses')
-rw-r--r-- | drivers/i2c/busses/scx200_acb.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c index 517a050625f1..02150bb25d43 100644 --- a/drivers/i2c/busses/scx200_acb.c +++ b/drivers/i2c/busses/scx200_acb.c @@ -378,6 +378,7 @@ static struct i2c_algorithm scx200_acb_algorithm = { }; static struct scx200_acb_iface *scx200_acb_list; +static DECLARE_MUTEX(scx200_acb_list_mutex); static int scx200_acb_probe(struct scx200_acb_iface *iface) { @@ -463,10 +464,10 @@ static int __init scx200_acb_create(int base, int index) goto errout_release; } - lock_kernel(); + down(&scx200_acb_list_mutex); iface->next = scx200_acb_list; scx200_acb_list = iface; - unlock_kernel(); + up(&scx200_acb_list_mutex); return 0; @@ -509,17 +510,17 @@ static void __exit scx200_acb_cleanup(void) { struct scx200_acb_iface *iface; - lock_kernel(); + down(&scx200_acb_list_mutex); while ((iface = scx200_acb_list) != NULL) { scx200_acb_list = iface->next; - unlock_kernel(); + up(&scx200_acb_list_mutex); i2c_del_adapter(&iface->adapter); release_region(iface->base, 8); kfree(iface); - lock_kernel(); + down(&scx200_acb_list_mutex); } - unlock_kernel(); + up(&scx200_acb_list_mutex); } module_init(scx200_acb_init); |