diff options
| author | Guenter Roeck <linux@roeck-us.net> | 2025-06-07 21:03:55 -0700 |
|---|---|---|
| committer | Guenter Roeck <linux@roeck-us.net> | 2025-10-15 11:02:43 -0700 |
| commit | 1cb5eca6f2261ab93e9cca115eec1442af066a0c (patch) | |
| tree | 1f0343381e82b3940c69dae3a6d7ddf336e925e1 | |
| parent | 9a4bbd20a879b66dddb563698345b0ae24d810a6 (diff) | |
hwmon: (drivetemp) Rely on subsystem locking
Attribute access is now serialized in the hardware monitoring core,
so locking in the driver code is no longer necessary. Drop it.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| -rw-r--r-- | drivers/hwmon/drivetemp.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/hwmon/drivetemp.c b/drivers/hwmon/drivetemp.c index 291d91f68646..9c5b021aab86 100644 --- a/drivers/hwmon/drivetemp.c +++ b/drivers/hwmon/drivetemp.c @@ -102,7 +102,6 @@ #include <linux/kernel.h> #include <linux/list.h> #include <linux/module.h> -#include <linux/mutex.h> #include <scsi/scsi_cmnd.h> #include <scsi/scsi_device.h> #include <scsi/scsi_driver.h> @@ -110,7 +109,6 @@ struct drivetemp_data { struct list_head list; /* list of instantiated devices */ - struct mutex lock; /* protect data buffer accesses */ struct scsi_device *sdev; /* SCSI device */ struct device *dev; /* instantiating device */ struct device *hwdev; /* hardware monitoring device */ @@ -462,9 +460,7 @@ static int drivetemp_read(struct device *dev, enum hwmon_sensor_types type, case hwmon_temp_input: case hwmon_temp_lowest: case hwmon_temp_highest: - mutex_lock(&st->lock); err = st->get_temp(st, attr, val); - mutex_unlock(&st->lock); break; case hwmon_temp_lcrit: *val = st->temp_lcrit; @@ -566,7 +562,6 @@ static int drivetemp_add(struct device *dev) st->sdev = sdev; st->dev = dev; - mutex_init(&st->lock); if (drivetemp_identify(st)) { err = -ENODEV; |