diff options
| -rw-r--r-- | drivers/hwmon/amc6821.c | 1 | ||||
| -rw-r--r-- | drivers/hwmon/asus_atk0110.c | 19 | ||||
| -rw-r--r-- | drivers/hwmon/fschmd.c | 7 | ||||
| -rw-r--r-- | drivers/hwmon/smsc47m1.c | 2 |
4 files changed, 15 insertions, 14 deletions
diff --git a/drivers/hwmon/amc6821.c b/drivers/hwmon/amc6821.c index 1c89d922d619..fa9708c2d723 100644 --- a/drivers/hwmon/amc6821.c +++ b/drivers/hwmon/amc6821.c | |||
| @@ -686,7 +686,6 @@ static ssize_t set_fan1_div( | |||
| 686 | data->fan1_div = 4; | 686 | data->fan1_div = 4; |
| 687 | break; | 687 | break; |
| 688 | default: | 688 | default: |
| 689 | mutex_unlock(&data->update_lock); | ||
| 690 | count = -EINVAL; | 689 | count = -EINVAL; |
| 691 | goto EXIT; | 690 | goto EXIT; |
| 692 | } | 691 | } |
diff --git a/drivers/hwmon/asus_atk0110.c b/drivers/hwmon/asus_atk0110.c index 6811346c1c62..028284f544e3 100644 --- a/drivers/hwmon/asus_atk0110.c +++ b/drivers/hwmon/asus_atk0110.c | |||
| @@ -1329,17 +1329,16 @@ static int atk_add(struct acpi_device *device) | |||
| 1329 | &buf, ACPI_TYPE_PACKAGE); | 1329 | &buf, ACPI_TYPE_PACKAGE); |
| 1330 | if (ret != AE_OK) { | 1330 | if (ret != AE_OK) { |
| 1331 | dev_dbg(&device->dev, "atk: method MBIF not found\n"); | 1331 | dev_dbg(&device->dev, "atk: method MBIF not found\n"); |
| 1332 | err = -ENODEV; | 1332 | } else { |
| 1333 | goto out; | 1333 | obj = buf.pointer; |
| 1334 | } | 1334 | if (obj->package.count >= 2) { |
| 1335 | 1335 | union acpi_object *id = &obj->package.elements[1]; | |
| 1336 | obj = buf.pointer; | 1336 | if (id->type == ACPI_TYPE_STRING) |
| 1337 | if (obj->package.count >= 2 && | 1337 | dev_dbg(&device->dev, "board ID = %s\n", |
| 1338 | obj->package.elements[1].type == ACPI_TYPE_STRING) { | 1338 | id->string.pointer); |
| 1339 | dev_dbg(&device->dev, "board ID = %s\n", | 1339 | } |
| 1340 | obj->package.elements[1].string.pointer); | 1340 | ACPI_FREE(buf.pointer); |
| 1341 | } | 1341 | } |
| 1342 | ACPI_FREE(buf.pointer); | ||
| 1343 | 1342 | ||
| 1344 | err = atk_probe_if(data); | 1343 | err = atk_probe_if(data); |
| 1345 | if (err) { | 1344 | if (err) { |
diff --git a/drivers/hwmon/fschmd.c b/drivers/hwmon/fschmd.c index bd0fc67e804b..fa0728232e71 100644 --- a/drivers/hwmon/fschmd.c +++ b/drivers/hwmon/fschmd.c | |||
| @@ -768,6 +768,7 @@ leave: | |||
| 768 | static int watchdog_open(struct inode *inode, struct file *filp) | 768 | static int watchdog_open(struct inode *inode, struct file *filp) |
| 769 | { | 769 | { |
| 770 | struct fschmd_data *pos, *data = NULL; | 770 | struct fschmd_data *pos, *data = NULL; |
| 771 | int watchdog_is_open; | ||
| 771 | 772 | ||
| 772 | /* We get called from drivers/char/misc.c with misc_mtx hold, and we | 773 | /* We get called from drivers/char/misc.c with misc_mtx hold, and we |
| 773 | call misc_register() from fschmd_probe() with watchdog_data_mutex | 774 | call misc_register() from fschmd_probe() with watchdog_data_mutex |
| @@ -782,10 +783,12 @@ static int watchdog_open(struct inode *inode, struct file *filp) | |||
| 782 | } | 783 | } |
| 783 | } | 784 | } |
| 784 | /* Note we can never not have found data, so we don't check for this */ | 785 | /* Note we can never not have found data, so we don't check for this */ |
| 785 | kref_get(&data->kref); | 786 | watchdog_is_open = test_and_set_bit(0, &data->watchdog_is_open); |
| 787 | if (!watchdog_is_open) | ||
| 788 | kref_get(&data->kref); | ||
| 786 | mutex_unlock(&watchdog_data_mutex); | 789 | mutex_unlock(&watchdog_data_mutex); |
| 787 | 790 | ||
| 788 | if (test_and_set_bit(0, &data->watchdog_is_open)) | 791 | if (watchdog_is_open) |
| 789 | return -EBUSY; | 792 | return -EBUSY; |
| 790 | 793 | ||
| 791 | /* Start the watchdog */ | 794 | /* Start the watchdog */ |
diff --git a/drivers/hwmon/smsc47m1.c b/drivers/hwmon/smsc47m1.c index 9ca97818bd4b..8fa462f2b570 100644 --- a/drivers/hwmon/smsc47m1.c +++ b/drivers/hwmon/smsc47m1.c | |||
| @@ -488,7 +488,7 @@ static int __init smsc47m1_find(unsigned short *addr, | |||
| 488 | } | 488 | } |
| 489 | 489 | ||
| 490 | /* Restore device to its initial state */ | 490 | /* Restore device to its initial state */ |
| 491 | static void __init smsc47m1_restore(const struct smsc47m1_sio_data *sio_data) | 491 | static void smsc47m1_restore(const struct smsc47m1_sio_data *sio_data) |
| 492 | { | 492 | { |
| 493 | if ((sio_data->activate & 0x01) == 0) { | 493 | if ((sio_data->activate & 0x01) == 0) { |
| 494 | superio_enter(); | 494 | superio_enter(); |
