Skip to contentSkip to conversation

hwmon: Fix more __devexit_p glitches

PATCH In review Jean Delvare 3 participants 4 messages Jun 4, 2009 – Jun 10, 2009 Hardware monitoring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwmon: Fix more __devexit_p glitches

Make sure __devexit and devexit_p() match in all hwmon drivers. Suggested by a similar fix from Mike Frysinger.

Cc Hans de Goede <[email protected]>
Cc Jonathan Cameron <[email protected]>
---
 drivers/hwmon/f71882fg.c |    2 +-
 drivers/hwmon/sht15.c    |   10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/hwmon/f71882fg.c +1 -1
@@ -253,7 +253,7 @@ static struct platform_driver f71882fg_d
 		.name	= DRVNAME,
 	},
 	.probe		= f71882fg_probe,
-	.remove		= __devexit_p(f71882fg_remove),
+	.remove		= f71882fg_remove,
 };
 
 static DEVICE_ATTR(name, S_IRUGO, show_name, NULL);
drivers/hwmon/sht15.c +5 -5
@@ -627,35 +627,35 @@ static struct platform_driver sht_driver
 			.owner = THIS_MODULE,
 		},
 		.probe = sht15_probe,
-		.remove = sht15_remove,
+		.remove = __devexit_p(sht15_remove),
 	}, {
 		.driver = {
 			.name = "sht11",
 			.owner = THIS_MODULE,
 		},
 		.probe = sht15_probe,
-		.remove = sht15_remove,
+		.remove = __devexit_p(sht15_remove),
 	}, {
 		.driver = {
 			.name = "sht15",
 			.owner = THIS_MODULE,
 		},
 		.probe = sht15_probe,
-		.remove = sht15_remove,
+		.remove = __devexit_p(sht15_remove),
 	}, {
 		.driver = {
 			.name = "sht71",
 			.owner = THIS_MODULE,
 		},
 		.probe = sht15_probe,
-		.remove = sht15_remove,
+		.remove = __devexit_p(sht15_remove),
 	}, {
 		.driver = {
 			.name = "sht75",
 			.owner = THIS_MODULE,
 		},
 		.probe = sht15_probe,
-		.remove = sht15_remove,
+		.remove = __devexit_p(sht15_remove),
 	},
 };
 
Signature · 6 lines
Jean Delvare

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

Hi,

Quoted 4 lines · Jean Delvare

Make sure __devexit and devexit_p() match in all hwmon drivers. Suggested by a similar fix from Mike Frysinger.

Looks good to me.

Regards,

Hans

Quoted 52 lines
Cc Hans de Goede<[email protected]>
Cc Jonathan Cameron<[email protected]>
---
  drivers/hwmon/f71882fg.c |    2 +-
  drivers/hwmon/sht15.c    |   10 +++++-----
  2 files changed, 6 insertions(+), 6 deletions(-)
drivers/hwmon/f71882fg.c +1 -1
@@ -253,7 +253,7 @@ static struct platform_driver f71882fg_d
  		.name	= DRVNAME,
  	},
  	.probe		= f71882fg_probe,
-	.remove		= __devexit_p(f71882fg_remove),
+	.remove		= f71882fg_remove,
  };
 
  static DEVICE_ATTR(name, S_IRUGO, show_name, NULL);
drivers/hwmon/sht15.c +4 -4
@@ -627,35 +627,35 @@ static struct platform_driver sht_driver
  			.owner = THIS_MODULE,
  		},
  		.probe = sht15_probe,
-		.remove = sht15_remove,
+		.remove = __devexit_p(sht15_remove),
  	}, {
  		.driver = {
  			.name = "sht11",
  			.owner = THIS_MODULE,
  		},
  		.probe = sht15_probe,
-		.remove = sht15_remove,
+		.remove = __devexit_p(sht15_remove),
  	}, {
  		.driver = {
  			.name = "sht15",
  			.owner = THIS_MODULE,
  		},
  		.probe = sht15_probe,
-		.remove = sht15_remove,
+		.remove = __devexit_p(sht15_remove),
  	}, {
  		.driver = {
  			.name = "sht71",
  			.owner = THIS_MODULE,
  		},
  		.probe = sht15_probe,
-		.remove = sht15_remove,
+		.remove = __devexit_p(sht15_remove),
  	}, {

drivers/hwmon/sht15.c static struct platform_driver sht_driver · line 661

Quoted 10 lines
drivers/hwmon/sht15.c +1 -1
  		.driver = {
  			.name = "sht75",
  			.owner = THIS_MODULE,
  		},
  		.probe = sht15_probe,
-		.remove = sht15_remove,
+		.remove = __devexit_p(sht15_remove),
  	},
  };
 

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

#2 lore raw
In reply to Jean Delvare
Quoted 16 lines · Jean Delvare

Make sure __devexit and devexit_p() match in all hwmon drivers. Suggested by a similar fix from Mike Frysinger.

Cc Hans de Goede <[email protected]>
Cc Jonathan Cameron <[email protected]>
---
 drivers/hwmon/f71882fg.c |    2 +-
 drivers/hwmon/sht15.c    |   10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

--- linux-2.6.30-rc8.orig/drivers/hwmon/f71882fg.c 2009-06-03
10:55:43.000000000 +0200
+++ linux-2.6.30-rc8/drivers/hwmon/f71882fg.c 2009-06-04
09:02:47.000000000 +0200

drivers/hwmon/f71882fg.c static struct platform_driver f71882fg_d · line 258

Quoted 7 lines
drivers/hwmon/f71882fg.c +1 -1
@@ -253,7 +253,7 @@ static struct platform_driver f71882fg_d
               .name   = DRVNAME,
       },
       .probe          = f71882fg_probe,
-       .remove         = __devexit_p(f71882fg_remove),
+       .remove         = f71882fg_remove,
 };
 

I think that one is reversed, certainly vs following.

Review static struct platform_driver f71882fg_d · line 259

Quoted 4 lines
(quoted diff) +1 -1
-               .remove = sht15_remove,
+               .remove = __devexit_p(sht15_remove),

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

#3 lore raw
In reply to Jean Delvare
Quoted 13 lines · Jim Cromie
Quoted 11 lines · Jean Delvare

Make sure __devexit and devexit_p() match in all hwmon drivers. Suggested by a similar fix from Mike Frysinger.

Cc Hans de Goede <[email protected]>
Cc Jonathan Cameron <[email protected]>
---
 drivers/hwmon/f71882fg.c |    2 +-
 drivers/hwmon/sht15.c    |   10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)
Quoted 15 lines

drivers/hwmon/f71882fg.c static struct platform_driver f71882fg_d · line 258

Quoted 12 lines

--- linux-2.6.30-rc8.orig/drivers/hwmon/f71882fg.c 2009-06-03
10:55:43.000000000 +0200
+++ linux-2.6.30-rc8/drivers/hwmon/f71882fg.c 2009-06-04
09:02:47.000000000 +0200

drivers/hwmon/f71882fg.c +1 -1
@@ -253,7 +253,7 @@ static struct platform_driver f71882fg_d
               .name   = DRVNAME,
       },
       .probe          = f71882fg_probe,
-       .remove         = __devexit_p(f71882fg_remove),
+       .remove         = f71882fg_remove,
 };
 

I think that one is reversed, certainly vs following.

This is on purpose. f71882fg_remove() is not marked with __devexit, so there is no point in protecting references thereto with __devexit_p().

Note that, contrary to the other way, this one does not cause build errors. It's just needlessly complex, and confusing for the reader.

Quoted 4 lines
Quoted 4 lines
(quoted diff) +1 -1
-               .remove = sht15_remove,
+               .remove = __devexit_p(sht15_remove),
Signature · 6 lines
Jean Delvare

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