[PATCH] [hwmon] mc13783-adc: fix module unloading

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The wrong device was passed to hwmon_device_unregister, resulting in

	mc13783 spi0.0: hwmon_device_unregister() failed: bad class ID!

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
Cc: Luotao Fu <l.fu@xxxxxxxxxxxxxx>
Cc: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
Cc: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Cc: Hans de Goede <hdegoede@xxxxxxxxxx>
Cc: Eric Piel <eric.piel@xxxxxxxxxxxxxxxx>
Cc: Jean Delvare <khali@xxxxxxxxxxxx>
---
Hello Jean,

can you either squash this into the commit you already took from me or
take this, too?

Best regards and thanks
Uwe

 drivers/hwmon/mc13783-adc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/hwmon/mc13783-adc.c b/drivers/hwmon/mc13783-adc.c
index 77eead2..e69ee81 100644
--- a/drivers/hwmon/mc13783-adc.c
+++ b/drivers/hwmon/mc13783-adc.c
@@ -199,7 +199,7 @@ static int __devexit mc13783_adc_remove(struct platform_device *pdev)
 {
 	struct mc13783_adc_priv *priv = platform_get_drvdata(pdev);
 
-	hwmon_device_unregister(&pdev->dev);
+	hwmon_device_unregister(priv->hwmon_dev);
 
 	if (!(priv->mc13783->flags & MC13783_USE_TOUCHSCREEN))
 		sysfs_remove_group(&pdev->dev.kobj, &mc13783_group_ts);
-- 
1.6.5


_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux