]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
hwmon: (chipcap2) Drop unnecessary include files
authorGuenter Roeck <linux@roeck-us.net>
Tue, 9 Sep 2025 13:10:07 +0000 (06:10 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 17 Oct 2025 14:18:15 +0000 (07:18 -0700)
The driver does not perform any locking, does not execute or use any sleep
related functionality, and does not allocate memory. Drop the unnecessary
include files.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/chipcap2.c

index 9d071f7ca9d2efc420a0d861676b5cacae68782a..645b8c2e704e6b3d8b63473fbca77e20d14b5b40 100644 (file)
@@ -81,7 +81,6 @@ struct cc2_data {
        struct completion complete;
        struct device *hwmon;
        struct i2c_client *client;
-       struct mutex dev_access_lock; /* device access lock */
        struct regulator *regulator;
        const char *name;
        int irq_ready;
@@ -558,8 +557,6 @@ static int cc2_read(struct device *dev, enum hwmon_sensor_types type, u32 attr,
 {
        struct cc2_data *data = dev_get_drvdata(dev);
 
-       guard(mutex)(&data->dev_access_lock);
-
        switch (type) {
        case hwmon_temp:
                return cc2_measurement(data, type, val);
@@ -600,8 +597,6 @@ static int cc2_write(struct device *dev, enum hwmon_sensor_types type, u32 attr,
        if (val < 0 || val > CC2_RH_MAX)
                return -EINVAL;
 
-       guard(mutex)(&data->dev_access_lock);
-
        switch (attr) {
        case hwmon_humidity_min:
                cmd = CC2_W_ALARM_L_ON;
@@ -708,8 +703,6 @@ static int cc2_probe(struct i2c_client *client)
 
        i2c_set_clientdata(client, data);
 
-       mutex_init(&data->dev_access_lock);
-
        data->client = client;
 
        data->regulator = devm_regulator_get_exclusive(dev, "vdd");