hwmon: (w83793) Drop useless mutex
Subsystems (2)
This is the same case as fschmd, from which the code was copied as far as I can see. So the same clean-up applies:
The WDIOC_GETSUPPORT ioctl only needs a mutex because it operates on a static variable. There is no good reason to keep this variable static, so let's just make it non-static and drop the now useless mutex altogether.
See the discussion at:
http://marc.info/?l=lm-sensors&m5563869402323&w=2
--- drivers/hwmon/w83793.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/hwmon/w83793.c +1 -4
@@ -51,7 +51,6 @@#define WATCHDOG_TIMEOUT 2/* 2 minute default timeout */ /* Addresses to scan */ -static DEFINE_MUTEX (watchdog_mutex);static const unsigned short normal_i2c[] = {0x2c ,0x2d ,0x2e ,0x2f ,I2C_CLIENT_END };
@@ -1350,7 +1349,7 @@ static ssize_t watchdog_write(struct filstatic long watchdog_ioctl (struct file *filp,unsigned int cmd,unsigned long arg) { -static struct watchdog_info ident = { +struct watchdog_info ident = { .options =WDIOF_KEEPALIVEPING |WDIOF_SETTIMEOUT |WDIOF_CARDRESET ,
@@ -1360,7 +1359,6 @@ static long watchdog_ioctl(struct file *int val, ret =0 ;struct w83793_data *data = filp->private_data; -mutex_lock (&watchdog_mutex);switch (cmd) {case WDIOC_GETSUPPORT :if (!nowayout)
@@ -1414,7 +1412,6 @@ static long watchdog_ioctl(struct file *default : ret = -ENOTTY ; } -mutex_unlock (&watchdog_mutex);return ret; }
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
Acked-byQuoted 8 lines · Jean Delvare
This is the same case as fschmd, from which the code was copied as far as I can see. So the same clean-up applies:
The
WDIOC_GETSUPPORTioctl only needs a mutex because it operates on a static variable. There is no good reason to keep this variable static, so let's just make it non-static and drop the now useless mutex altogether.
Quoted 7 lines
See the discussion at:
http://marc.info/?l=lm-sensors&m5563869402323&w=2Signed-off-by Jean Delvare <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Hans de Goede <[email protected]>
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Arnd Bergmann
Acked-byQuoted 8 lines · Jean Delvare
This is the same case as fschmd, from which the code was copied as far as I can see. So the same clean-up applies:
The
WDIOC_GETSUPPORTioctl only needs a mutex because it operates on a static variable. There is no good reason to keep this variable static, so let's just make it non-static and drop the now useless mutex altogether.
Quoted 7 lines
See the discussion at:
http://marc.info/?l=lm-sensors&m5563869402323&w=2Signed-off-by Jean Delvare <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Hans de Goede <[email protected]>
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Thomas Gleixner
Acked-byQuoted 12 lines · Arnd Bergmann
Quoted 11 lines · Jean Delvare
This is the same case as fschmd, from which the code was copied as far as I can see. So the same clean-up applies:
The
WDIOC_GETSUPPORTioctl only needs a mutex because it operates on a static variable. There is no good reason to keep this variable static, so let's just make it non-static and drop the now useless mutex altogether.See the discussion at:
http://marc.info/?l=lm-sensors&m5563869402323&w=2
Quoted 6 lines
Quoted 4 lines
Signed-off-by Jean Delvare <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Arnd Bergmann <[email protected]>Cc Hans de Goede <[email protected]>Acked-by Arnd Bergmann <[email protected]>
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors