Skip to contentSkip to conversation

hp_accel: Fix race in device removal

PATCH In review Oliver Neukum 2 participants 3 messages May 7, 2010 Hardware monitoring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hp_accel: Fix race in device removal

From 64a9e0d8e585c65526248e6cf1659a13fb01a93a Mon Sep 17 00:00:00 2001
From: Oliver Neukum <[email protected]>
Date: Fri, 7 May 2010 17:41:59 +0200
Subject: [PATCH] hp_accel: Fix race in device removal

The work queue has to be flushed after the device has been made inaccessible.

---
 drivers/hwmon/hp_accel.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/hwmon/hp_accel.c +2 -2
index c8ab505..6f6e05d 100644
@@ -328,9 +328,9 @@ static int lis3lv02d_remove(struct acpi_device *device, int type)
 	lis3lv02d_joystick_disable();
 	lis3lv02d_poweroff(&lis3_dev);
 
-	flush_work(&hpled_led.work);
 	led_classdev_unregister(&hpled_led.led_classdev);
-
+	flush_work(&hpled_led.work);
+	
 	return lis3lv02d_remove_fs(&lis3_dev);
 }
 
Signature · 7 lines
1.6.4.2


_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#1 lore raw

Hi Oliver,

Quoted 19 lines · Oliver Neukum

From 64a9e0d8e585c65526248e6cf1659a13fb01a93a Mon Sep 17 00:00:00 2001
From: Oliver Neukum <[email protected]>
Date: Fri, 7 May 2010 17:41:59 +0200
Subject: [PATCH] hp_accel: Fix race in device removal

The work queue has to be flushed after the device has been made inaccessible.

---
 drivers/hwmon/hp_accel.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/hwmon/hp_accel.c +0 -0
index c8ab505..6f6e05d 100644
@@ -328,9 +328,9 @@ static int lis3lv02d_remove(struct acpi_device *device, int type)
 	lis3lv02d_joystick_disable();

drivers/hwmon/hp_accel.c static int lis3lv02d_remove(struct acpi_device *device, int type) · line 336

Quoted 10 lines
drivers/hwmon/hp_accel.c +2 -2
 	lis3lv02d_poweroff(&lis3_dev);
 
-	flush_work(&hpled_led.work);
 	led_classdev_unregister(&hpled_led.led_classdev);
-
+	flush_work(&hpled_led.work);
+	
 	return lis3lv02d_remove_fs(&lis3_dev);
 }
 

You are adding trailing white space. Please don't. Use scripts/checkpatch.pl to check your patches before you send them.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#2 lore raw

Am Freitag, 7. Mai 2010 17:54:01 schrieb Jean Delvare:

Quoted 24 lines

Hi Oliver,

Quoted 21 lines · Oliver Neukum

From 64a9e0d8e585c65526248e6cf1659a13fb01a93a Mon Sep 17 00:00:00 2001
From: Oliver Neukum <[email protected]>
Date: Fri, 7 May 2010 17:41:59 +0200
Subject: [PATCH] hp_accel: Fix race in device removal

The work queue has to be flushed after the device has been made inaccessible.

---
 drivers/hwmon/hp_accel.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/hwmon/hp_accel.c +0 -0
index c8ab505..6f6e05d 100644
@@ -328,9 +328,9 @@ static int lis3lv02d_remove(struct acpi_device *device, int type)
 	lis3lv02d_joystick_disable();
 	lis3lv02d_poweroff(&lis3_dev);
 
Quoted 11 lines

drivers/hwmon/hp_accel.c static int lis3lv02d_remove(struct acpi_device *device, int type) · line 336

Quoted 8 lines
drivers/hwmon/hp_accel.c +2 -2
-	flush_work(&hpled_led.work);
 	led_classdev_unregister(&hpled_led.led_classdev);
-
+	flush_work(&hpled_led.work);
+	
 	return lis3lv02d_remove_fs(&lis3_dev);
 }
 

You are adding trailing white space. Please don't. Use scripts/checkpatch.pl to check your patches before you send them.

Thank you. A corrected version is on its way.

Regards
Oliver

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors