aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/sch5636.c
diff options
context:
space:
mode:
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 @@
1/*************************************************************************** 1/***************************************************************************
2 * Copyright (C) 2011 Hans de Goede <hdegoede@redhat.com> * 2 * Copyright (C) 2011-2012 Hans de Goede <hdegoede@redhat.com> *
3 * * 3 * *
4 * This program is free software; you can redistribute it and/or modify * 4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by * 5 * 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] = {
67struct sch5636_data { 67struct sch5636_data {
68 unsigned short addr; 68 unsigned short addr;
69 struct device *hwmon_dev; 69 struct device *hwmon_dev;
70 struct sch56xx_watchdog_data *watchdog;
70 71
71 struct mutex update_lock; 72 struct mutex update_lock;
72 char valid; /* !=0 if following fields are valid */ 73 char valid; /* !=0 if following fields are valid */
@@ -384,6 +385,9 @@ static int sch5636_remove(struct platform_device *pdev)
384 struct sch5636_data *data = platform_get_drvdata(pdev); 385 struct sch5636_data *data = platform_get_drvdata(pdev);
385 int i; 386 int i;
386 387
388 if (data->watchdog)
389 sch56xx_watchdog_unregister(data->watchdog);
390
387 if (data->hwmon_dev) 391 if (data->hwmon_dev)
388 hwmon_device_unregister(data->hwmon_dev); 392 hwmon_device_unregister(data->hwmon_dev);
389 393
@@ -505,6 +509,11 @@ static int __devinit sch5636_probe(struct platform_device *pdev)
505 goto error; 509 goto error;
506 } 510 }
507 511
512 /* Note failing to register the watchdog is not a fatal error */
513 data->watchdog = sch56xx_watchdog_register(data->addr,
514 (revision[0] << 8) | revision[1],
515 &data->update_lock, 0);
516
508 return 0; 517 return 0;
509 518
510error: 519error: