diff options
Diffstat (limited to 'drivers/hwmon/sch5627.c')
-rw-r--r-- | drivers/hwmon/sch5627.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/hwmon/sch5627.c b/drivers/hwmon/sch5627.c index 79b6dabe3161..8ec6dfbccb64 100644 --- a/drivers/hwmon/sch5627.c +++ b/drivers/hwmon/sch5627.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | * Copyright (C) 2010-2011 Hans de Goede <hdegoede@redhat.com> * | 2 | * Copyright (C) 2010-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 * |
@@ -79,6 +79,7 @@ static const char * const SCH5627_IN_LABELS[SCH5627_NO_IN] = { | |||
79 | struct sch5627_data { | 79 | struct sch5627_data { |
80 | unsigned short addr; | 80 | unsigned short addr; |
81 | struct device *hwmon_dev; | 81 | struct device *hwmon_dev; |
82 | struct sch56xx_watchdog_data *watchdog; | ||
82 | u8 control; | 83 | u8 control; |
83 | u8 temp_max[SCH5627_NO_TEMPS]; | 84 | u8 temp_max[SCH5627_NO_TEMPS]; |
84 | u8 temp_crit[SCH5627_NO_TEMPS]; | 85 | u8 temp_crit[SCH5627_NO_TEMPS]; |
@@ -453,6 +454,9 @@ static int sch5627_remove(struct platform_device *pdev) | |||
453 | { | 454 | { |
454 | struct sch5627_data *data = platform_get_drvdata(pdev); | 455 | struct sch5627_data *data = platform_get_drvdata(pdev); |
455 | 456 | ||
457 | if (data->watchdog) | ||
458 | sch56xx_watchdog_unregister(data->watchdog); | ||
459 | |||
456 | if (data->hwmon_dev) | 460 | if (data->hwmon_dev) |
457 | hwmon_device_unregister(data->hwmon_dev); | 461 | hwmon_device_unregister(data->hwmon_dev); |
458 | 462 | ||
@@ -574,6 +578,11 @@ static int __devinit sch5627_probe(struct platform_device *pdev) | |||
574 | goto error; | 578 | goto error; |
575 | } | 579 | } |
576 | 580 | ||
581 | /* Note failing to register the watchdog is not a fatal error */ | ||
582 | data->watchdog = sch56xx_watchdog_register(data->addr, | ||
583 | (build_code << 24) | (build_id << 8) | hwmon_rev, | ||
584 | &data->update_lock, 1); | ||
585 | |||
577 | return 0; | 586 | return 0; |
578 | 587 | ||
579 | error: | 588 | error: |