diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-23 18:51:32 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-23 18:51:32 -0500 |
| commit | b6585dedac232ca79fe978d97a95fdaa6da24f66 (patch) | |
| tree | 4d2d78300bb9bcfb40cb35450f78dd3af82c78d3 /drivers/i2c/chips/max6875.c | |
| parent | a3ea9b584ed2acdeae817f0dc91a5880e0828a05 (diff) | |
| parent | ded2b66615613093eeb83b81499bc270de8fc499 (diff) | |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6: (36 commits)
[PATCH] hwmon: add required idr locking
[PATCH] I2C: hwmon: Rename register parameters
[PATCH] I2C: Drop unneeded i2c-dev.h includes
[PATCH] I2C: i2c-ixp4xx: Add hwmon class
[PATCH] I2C: i2c-piix4: Add Broadcom HT-1000 support
[PATCH] I2C: i2c-amd756-s4882: Improve static mutex initialization
[PATCH] I2C: i2c-ali1535: Drop redundant mutex
[PATCH] i2c: Cleanup isp1301_omap
[PATCH] i2c: Fix i2c-ite name initialization
[PATCH] i2c: Drop the i2c-frodo bus driver
[PATCH] i2c: Optimize core_lists mutex usage
[PATCH] w83781d: Don't reset the chip by default
[PATCH] w83781d: Document the alarm and beep bits
[PATCH] w83627ehf: Refactor the sysfs interface
[PATCH] hwmon: Support the Pentium M VID code
[PATCH] hwmon: Add support for the Winbond W83687THF
[PATCH] hwmon: f71805f semaphore to mutex conversions
[PATCH] hwmon: Semaphore to mutex conversions
[PATCH] i2c: Semaphore to mutex conversions, part 3
[PATCH] i2c: Semaphore to mutex conversions, part 2
...
Diffstat (limited to 'drivers/i2c/chips/max6875.c')
| -rw-r--r-- | drivers/i2c/chips/max6875.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/i2c/chips/max6875.c b/drivers/i2c/chips/max6875.c index 6d3ff584155e..88d2ddee4490 100644 --- a/drivers/i2c/chips/max6875.c +++ b/drivers/i2c/chips/max6875.c | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
| 32 | #include <linux/slab.h> | 32 | #include <linux/slab.h> |
| 33 | #include <linux/i2c.h> | 33 | #include <linux/i2c.h> |
| 34 | #include <asm/semaphore.h> | 34 | #include <linux/mutex.h> |
| 35 | 35 | ||
| 36 | /* Do not scan - the MAX6875 access method will write to some EEPROM chips */ | 36 | /* Do not scan - the MAX6875 access method will write to some EEPROM chips */ |
| 37 | static unsigned short normal_i2c[] = {I2C_CLIENT_END}; | 37 | static unsigned short normal_i2c[] = {I2C_CLIENT_END}; |
| @@ -54,7 +54,7 @@ I2C_CLIENT_INSMOD_1(max6875); | |||
| 54 | /* Each client has this additional data */ | 54 | /* Each client has this additional data */ |
| 55 | struct max6875_data { | 55 | struct max6875_data { |
| 56 | struct i2c_client client; | 56 | struct i2c_client client; |
| 57 | struct semaphore update_lock; | 57 | struct mutex update_lock; |
| 58 | 58 | ||
| 59 | u32 valid; | 59 | u32 valid; |
| 60 | u8 data[USER_EEPROM_SIZE]; | 60 | u8 data[USER_EEPROM_SIZE]; |
| @@ -83,7 +83,7 @@ static void max6875_update_slice(struct i2c_client *client, int slice) | |||
| 83 | if (slice >= USER_EEPROM_SLICES) | 83 | if (slice >= USER_EEPROM_SLICES) |
| 84 | return; | 84 | return; |
| 85 | 85 | ||
| 86 | down(&data->update_lock); | 86 | mutex_lock(&data->update_lock); |
| 87 | 87 | ||
| 88 | buf = &data->data[slice << SLICE_BITS]; | 88 | buf = &data->data[slice << SLICE_BITS]; |
| 89 | 89 | ||
| @@ -122,7 +122,7 @@ static void max6875_update_slice(struct i2c_client *client, int slice) | |||
| 122 | data->valid |= (1 << slice); | 122 | data->valid |= (1 << slice); |
| 123 | } | 123 | } |
| 124 | exit_up: | 124 | exit_up: |
| 125 | up(&data->update_lock); | 125 | mutex_unlock(&data->update_lock); |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | static ssize_t max6875_read(struct kobject *kobj, char *buf, loff_t off, | 128 | static ssize_t max6875_read(struct kobject *kobj, char *buf, loff_t off, |
| @@ -196,7 +196,7 @@ static int max6875_detect(struct i2c_adapter *adapter, int address, int kind) | |||
| 196 | real_client->driver = &max6875_driver; | 196 | real_client->driver = &max6875_driver; |
| 197 | real_client->flags = 0; | 197 | real_client->flags = 0; |
| 198 | strlcpy(real_client->name, "max6875", I2C_NAME_SIZE); | 198 | strlcpy(real_client->name, "max6875", I2C_NAME_SIZE); |
| 199 | init_MUTEX(&data->update_lock); | 199 | mutex_init(&data->update_lock); |
| 200 | 200 | ||
| 201 | /* Init fake client data */ | 201 | /* Init fake client data */ |
| 202 | /* set the client data to the i2c_client so that it will get freed */ | 202 | /* set the client data to the i2c_client so that it will get freed */ |
