diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-01-02 20:46:14 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-01-02 20:46:14 -0500 |
commit | ef05e9b9602660fd468e05f5fbe8f08ad7418b73 (patch) | |
tree | 7de3ceb677e7bccb997e3ad80be09b99f528aa42 /drivers | |
parent | 080a62e2ceec28163194facb837d6388983aae5d (diff) | |
parent | 8899b8d93ec64b7a8e54807a68a958e1206535e2 (diff) |
Merge git://www.linux-watchdog.org/linux-watchdog
Pull watchdog fixes from Wim Van Sebroeck:
"This fixes some small errors in the new da9055 driver, eliminates a
compiler warning and adds DT support for the twl4030_wdt driver (so
that we can have multiple watchdogs with DT on the omap platforms)."
* git://www.linux-watchdog.org/linux-watchdog:
watchdog: twl4030_wdt: add DT support
watchdog: omap_wdt: eliminate unused variable and a compiler warning
watchdog: da9055: Don't update wdt_dev->timeout in da9055_wdt_set_timeout error path
watchdog: da9055: Fix invalid free of devm_ allocated data
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/watchdog/da9055_wdt.c | 17 | ||||
-rw-r--r-- | drivers/watchdog/omap_wdt.c | 1 | ||||
-rw-r--r-- | drivers/watchdog/twl4030_wdt.c | 11 |
3 files changed, 15 insertions, 14 deletions
diff --git a/drivers/watchdog/da9055_wdt.c b/drivers/watchdog/da9055_wdt.c index 709ea1aefebb..f5ad10546fc9 100644 --- a/drivers/watchdog/da9055_wdt.c +++ b/drivers/watchdog/da9055_wdt.c | |||
@@ -72,20 +72,21 @@ static int da9055_wdt_set_timeout(struct watchdog_device *wdt_dev, | |||
72 | DA9055_TWDSCALE_MASK, | 72 | DA9055_TWDSCALE_MASK, |
73 | da9055_wdt_maps[i].reg_val << | 73 | da9055_wdt_maps[i].reg_val << |
74 | DA9055_TWDSCALE_SHIFT); | 74 | DA9055_TWDSCALE_SHIFT); |
75 | if (ret < 0) | 75 | if (ret < 0) { |
76 | dev_err(da9055->dev, | 76 | dev_err(da9055->dev, |
77 | "Failed to update timescale bit, %d\n", ret); | 77 | "Failed to update timescale bit, %d\n", ret); |
78 | return ret; | ||
79 | } | ||
78 | 80 | ||
79 | wdt_dev->timeout = timeout; | 81 | wdt_dev->timeout = timeout; |
80 | 82 | ||
81 | return ret; | 83 | return 0; |
82 | } | 84 | } |
83 | 85 | ||
84 | static int da9055_wdt_ping(struct watchdog_device *wdt_dev) | 86 | static int da9055_wdt_ping(struct watchdog_device *wdt_dev) |
85 | { | 87 | { |
86 | struct da9055_wdt_data *driver_data = watchdog_get_drvdata(wdt_dev); | 88 | struct da9055_wdt_data *driver_data = watchdog_get_drvdata(wdt_dev); |
87 | struct da9055 *da9055 = driver_data->da9055; | 89 | struct da9055 *da9055 = driver_data->da9055; |
88 | int ret; | ||
89 | 90 | ||
90 | /* | 91 | /* |
91 | * We have a minimum time for watchdog window called TWDMIN. A write | 92 | * We have a minimum time for watchdog window called TWDMIN. A write |
@@ -94,18 +95,12 @@ static int da9055_wdt_ping(struct watchdog_device *wdt_dev) | |||
94 | mdelay(DA9055_TWDMIN); | 95 | mdelay(DA9055_TWDMIN); |
95 | 96 | ||
96 | /* Reset the watchdog timer */ | 97 | /* Reset the watchdog timer */ |
97 | ret = da9055_reg_update(da9055, DA9055_REG_CONTROL_E, | 98 | return da9055_reg_update(da9055, DA9055_REG_CONTROL_E, |
98 | DA9055_WATCHDOG_MASK, 1); | 99 | DA9055_WATCHDOG_MASK, 1); |
99 | |||
100 | return ret; | ||
101 | } | 100 | } |
102 | 101 | ||
103 | static void da9055_wdt_release_resources(struct kref *r) | 102 | static void da9055_wdt_release_resources(struct kref *r) |
104 | { | 103 | { |
105 | struct da9055_wdt_data *driver_data = | ||
106 | container_of(r, struct da9055_wdt_data, kref); | ||
107 | |||
108 | kfree(driver_data); | ||
109 | } | 104 | } |
110 | 105 | ||
111 | static void da9055_wdt_ref(struct watchdog_device *wdt_dev) | 106 | static void da9055_wdt_ref(struct watchdog_device *wdt_dev) |
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c index 34ed61ea02b4..b0e541d022e6 100644 --- a/drivers/watchdog/omap_wdt.c +++ b/drivers/watchdog/omap_wdt.c | |||
@@ -296,7 +296,6 @@ static int omap_wdt_remove(struct platform_device *pdev) | |||
296 | { | 296 | { |
297 | struct watchdog_device *wdog = platform_get_drvdata(pdev); | 297 | struct watchdog_device *wdog = platform_get_drvdata(pdev); |
298 | struct omap_wdt_dev *wdev = watchdog_get_drvdata(wdog); | 298 | struct omap_wdt_dev *wdev = watchdog_get_drvdata(wdog); |
299 | struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
300 | 299 | ||
301 | pm_runtime_disable(wdev->dev); | 300 | pm_runtime_disable(wdev->dev); |
302 | watchdog_unregister_device(wdog); | 301 | watchdog_unregister_device(wdog); |
diff --git a/drivers/watchdog/twl4030_wdt.c b/drivers/watchdog/twl4030_wdt.c index 81918cf8993b..0f03106f7516 100644 --- a/drivers/watchdog/twl4030_wdt.c +++ b/drivers/watchdog/twl4030_wdt.c | |||
@@ -131,14 +131,21 @@ static int twl4030_wdt_resume(struct platform_device *pdev) | |||
131 | #define twl4030_wdt_resume NULL | 131 | #define twl4030_wdt_resume NULL |
132 | #endif | 132 | #endif |
133 | 133 | ||
134 | static const struct of_device_id twl_wdt_of_match[] = { | ||
135 | { .compatible = "ti,twl4030-wdt", }, | ||
136 | { }, | ||
137 | }; | ||
138 | MODULE_DEVICE_TABLE(of, twl_wdt_of_match); | ||
139 | |||
134 | static struct platform_driver twl4030_wdt_driver = { | 140 | static struct platform_driver twl4030_wdt_driver = { |
135 | .probe = twl4030_wdt_probe, | 141 | .probe = twl4030_wdt_probe, |
136 | .remove = twl4030_wdt_remove, | 142 | .remove = twl4030_wdt_remove, |
137 | .suspend = twl4030_wdt_suspend, | 143 | .suspend = twl4030_wdt_suspend, |
138 | .resume = twl4030_wdt_resume, | 144 | .resume = twl4030_wdt_resume, |
139 | .driver = { | 145 | .driver = { |
140 | .owner = THIS_MODULE, | 146 | .owner = THIS_MODULE, |
141 | .name = "twl4030_wdt", | 147 | .name = "twl4030_wdt", |
148 | .of_match_table = twl_wdt_of_match, | ||
142 | }, | 149 | }, |
143 | }; | 150 | }; |
144 | 151 | ||