From fd2023d0cf27484d3075b559058793205fb6d32b Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Sun, 14 May 2006 14:59:37 +0000 Subject: [PATCH] Static semaphores can be initialized at declaration time. This is a backport from Linux 2.6. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@3292 7894878c-1315-0410-8ee3-d5d059ff63e0 --- kernel/busses/i2c-amd756-s4882.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/busses/i2c-amd756-s4882.c b/kernel/busses/i2c-amd756-s4882.c index 195da2ad..0707c1dc 100644 --- a/kernel/busses/i2c-amd756-s4882.c +++ b/kernel/busses/i2c-amd756-s4882.c @@ -48,7 +48,7 @@ static struct i2c_adapter *s4882_adapter; static struct i2c_algorithm *s4882_algo; /* Wrapper access functions for multiplexed SMBus */ -static struct semaphore amd756_lock; +static DECLARE_MUTEX(amd756_lock); static s32 amd756_access_virt0(struct i2c_adapter * adap, u16 addr, unsigned short flags, char read_write, @@ -167,7 +167,6 @@ static int __init amd756_s4882_init(void) } printk(KERN_INFO "Enabling SMBus multiplexing for Tyan S4882\n"); - init_MUTEX(&amd756_lock); /* Define the 5 virtual adapters and algorithms structures */ if (!(s4882_adapter = kmalloc(5 * sizeof(struct i2c_adapter),