aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2006-02-27 23:09:22 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-23 14:21:54 -0800
commitd7d2fe384703f3f57dac94e8e6303a9f0d9a6239 (patch)
tree20164709d167953c1f2e05d7ae2c922fc262e1e3
parent0cbcb4d39a83d4df7e45c13b5ebd9fe73e025237 (diff)
[PATCH] I2C: i2c-amd756-s4882: Improve static mutex initialization
Static mutexes can be initialized at declaration time. Signed-off-by: Jean Delvare <khali@linux-fr.org>
-rw-r--r--drivers/i2c/busses/i2c-amd756-s4882.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-amd756-s4882.c b/drivers/i2c/busses/i2c-amd756-s4882.c
index f7b4cb4e9c7..08e915730ca 100644
--- a/drivers/i2c/busses/i2c-amd756-s4882.c
+++ b/drivers/i2c/busses/i2c-amd756-s4882.c
@@ -46,7 +46,7 @@ static struct i2c_adapter *s4882_adapter;
static struct i2c_algorithm *s4882_algo;
/* Wrapper access functions for multiplexed SMBus */
-static struct mutex amd756_lock;
+static DEFINE_MUTEX(amd756_lock);
static s32 amd756_access_virt0(struct i2c_adapter * adap, u16 addr,
unsigned short flags, char read_write,
@@ -167,8 +167,6 @@ static int __init amd756_s4882_init(void)
}
printk(KERN_INFO "Enabling SMBus multiplexing for Tyan S4882\n");
- mutex_init(&amd756_lock);
-
/* Define the 5 virtual adapters and algorithms structures */
if (!(s4882_adapter = kzalloc(5 * sizeof(struct i2c_adapter),
GFP_KERNEL))) {