summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/sch5636.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2012-04-06 21:48:59 -0400
committerLen Brown <len.brown@intel.com>2012-04-06 21:48:59 -0400
commiteeaab2d8af2cf1d36d7086f22e9de42d6dd2995c (patch)
tree369b9c91a6d808944f07d2290fec6f9fe2731904 /drivers/hwmon/sch5636.c
parentee01e663373343c63e0e3d364d09f6155378dbcc (diff)
parentaaef292acf3a78d9c0bb6fb72226077d286b45d7 (diff)
Merge branches 'idle-fix' and 'misc' into release
Diffstat (limited to 'drivers/hwmon/sch5636.c')
-rw-r--r--drivers/hwmon/sch5636.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/hwmon/sch5636.c b/drivers/hwmon/sch5636.c
index 9d5236fb09b..906d4ed32d8 100644
--- a/drivers/hwmon/sch5636.c
+++ b/drivers/hwmon/sch5636.c
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2011 Hans de Goede <hdegoede@redhat.com> *
+ * Copyright (C) 2011-2012 Hans de Goede <hdegoede@redhat.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -67,6 +67,7 @@ static const u16 SCH5636_REG_FAN_VAL[SCH5636_NO_FANS] = {
struct sch5636_data {
unsigned short addr;
struct device *hwmon_dev;
+ struct sch56xx_watchdog_data *watchdog;
struct mutex update_lock;
char valid; /* !=0 if following fields are valid */
@@ -384,6 +385,9 @@ static int sch5636_remove(struct platform_device *pdev)
struct sch5636_data *data = platform_get_drvdata(pdev);
int i;
+ if (data->watchdog)
+ sch56xx_watchdog_unregister(data->watchdog);
+
if (data->hwmon_dev)
hwmon_device_unregister(data->hwmon_dev);
@@ -505,6 +509,11 @@ static int __devinit sch5636_probe(struct platform_device *pdev)
goto error;
}
+ /* Note failing to register the watchdog is not a fatal error */
+ data->watchdog = sch56xx_watchdog_register(data->addr,
+ (revision[0] << 8) | revision[1],
+ &data->update_lock, 0);
+
return 0;
error: