summary refs log tree commit diff
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2016-09-16 10:07:36 +0200
committerGuenter Roeck <linux@roeck-us.net>2016-09-18 10:10:26 -0700
commitdc8b73ebe543f53ec78507a9d0d37073773f6157 (patch)
tree02b2a5054b888891f5a2168f65c4214b0ae3b78d /drivers/hwmon
parent0a8784e792a03a04a2ec3bc443183a2f42058e30 (diff)
downloadlinux-dc8b73ebe543f53ec78507a9d0d37073773f6157.tar.gz
hwmon: (adt7470) No need for additional synchronization on kthread_stop()
The kthread_stop() waits for the thread to exit. There is no need for an
additional synchronization needed to join on the kthread.

The completion was added by 89fac11cb3e7 ("adt7470: make automatic fan
control really work").

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
Cc: Darrick J. Wong <djwong@us.ibm.com>
Cc: Jean Delvare <jdelvare@suse.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/adt7470.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/hwmon/adt7470.c b/drivers/hwmon/adt7470.c
index ffe1edc10ef0..6e60ca53406e 100644
--- a/drivers/hwmon/adt7470.c
+++ b/drivers/hwmon/adt7470.c
@@ -177,7 +177,6 @@ struct adt7470_data {
 	u8			pwm_auto_temp[ADT7470_PWM_COUNT];
 
 	struct task_struct	*auto_update;
-	struct completion	auto_update_stop;
 	unsigned int		auto_update_interval;
 };
 
@@ -281,7 +280,6 @@ static int adt7470_update_thread(void *p)
 		schedule_timeout(msecs_to_jiffies(data->auto_update_interval));
 	}
 
-	complete_all(&data->auto_update_stop);
 	return 0;
 }
 
@@ -1356,7 +1354,6 @@ static int adt7470_probe(struct i2c_client *client,
 	if (IS_ERR(hwmon_dev))
 		return PTR_ERR(hwmon_dev);
 
-	init_completion(&data->auto_update_stop);
 	data->auto_update = kthread_run(adt7470_update_thread, client, "%s",
 					dev_name(hwmon_dev));
 	if (IS_ERR(data->auto_update)) {
@@ -1371,7 +1368,6 @@ static int adt7470_remove(struct i2c_client *client)
 	struct adt7470_data *data = i2c_get_clientdata(client);
 
 	kthread_stop(data->auto_update);
-	wait_for_completion(&data->auto_update_stop);
 	return 0;
 }