mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-20 19:41:47 +00:00
smsc47m1: Get rid of a useless semaphore (backport from Linux 2.6).
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4332 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
820bd2eda7
commit
946fc47468
2 files changed
+5
-17
No files matched your search
@@ -16,6 +16,7 @@ SVN HEAD
|
||||
Module i2c-piix4: Add ATI SB600 support (2.6 backport)
|
||||
Module i2c-viapro: Add CX700 support (2.6 backport)
|
||||
Module smsc47m1: Add SMSC LPC47M292 support
|
||||
Get rid of a useless semaphore (2.6 backport)
|
||||
Programs i2cdetect, i2cdump, isadump: Flush output in real time
|
||||
Program sensors: Add smsc47m2 support (fans)
|
||||
Program sensors-detect: Only probe relevant I2C addresses
|
||||
|
||||
+4
-17
@@ -138,7 +138,6 @@ static inline u8 MIN_TO_REG(long rpm, int div)
|
||||
|
||||
struct smsc47m1_data {
|
||||
struct i2c_client client;
|
||||
struct semaphore lock;
|
||||
int sysctl_id;
|
||||
enum chips type;
|
||||
|
||||
@@ -158,10 +157,6 @@ static int smsc47m1_attach_adapter(struct i2c_adapter *adapter);
|
||||
static int smsc47m1_detect(struct i2c_adapter *adapter, int address,
|
||||
unsigned short flags, int kind);
|
||||
static int smsc47m1_detach_client(struct i2c_client *client);
|
||||
|
||||
static int smsc47m1_read_value(struct i2c_client *client, u8 register);
|
||||
static int smsc47m1_write_value(struct i2c_client *client, u8 register,
|
||||
u8 value);
|
||||
static void smsc47m1_update_client(struct i2c_client *client);
|
||||
static void smsc47m1_init_client(struct i2c_client *client);
|
||||
|
||||
@@ -329,7 +324,6 @@ int smsc47m1_detect(struct i2c_adapter *adapter, int address,
|
||||
|
||||
new_client = &data->client;
|
||||
new_client->addr = address;
|
||||
init_MUTEX(&data->lock);
|
||||
new_client->data = data;
|
||||
new_client->adapter = adapter;
|
||||
new_client->driver = &smsc47m1_driver;
|
||||
@@ -385,22 +379,15 @@ static int smsc47m1_detach_client(struct i2c_client *client)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int smsc47m1_read_value(struct i2c_client *client, u8 reg)
|
||||
static inline int smsc47m1_read_value(struct i2c_client *client, u8 reg)
|
||||
{
|
||||
int res;
|
||||
|
||||
down(&(((struct smsc47m1_data *) (client->data))->lock));
|
||||
res = inb_p(client->addr + reg);
|
||||
up(&(((struct smsc47m1_data *) (client->data))->lock));
|
||||
return res;
|
||||
return inb_p(client->addr + reg);
|
||||
}
|
||||
|
||||
static int smsc47m1_write_value(struct i2c_client *client, u8 reg, u8 value)
|
||||
static inline void smsc47m1_write_value(struct i2c_client *client, u8 reg,
|
||||
u8 value)
|
||||
{
|
||||
down(&(((struct smsc47m1_data *) (client->data))->lock));
|
||||
outb_p(value, client->addr + reg);
|
||||
up(&(((struct smsc47m1_data *) (client->data))->lock));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void smsc47m1_init_client(struct i2c_client *client)
|
||||
|
||||
Reference in new issue
Block a user