|
@@ -359,7 +359,7 @@ static struct resource da8xx_watchdog_resources[] = {
|
|
|
},
|
|
|
};
|
|
|
|
|
|
-struct platform_device da8xx_wdt_device = {
|
|
|
+static struct platform_device da8xx_wdt_device = {
|
|
|
.name = "watchdog",
|
|
|
.id = -1,
|
|
|
.num_resources = ARRAY_SIZE(da8xx_watchdog_resources),
|
|
@@ -368,7 +368,15 @@ struct platform_device da8xx_wdt_device = {
|
|
|
|
|
|
void da8xx_restart(char mode, const char *cmd)
|
|
|
{
|
|
|
- davinci_watchdog_reset(&da8xx_wdt_device);
|
|
|
+ struct device *dev;
|
|
|
+
|
|
|
+ dev = bus_find_device_by_name(&platform_bus_type, NULL, "watchdog");
|
|
|
+ if (!dev) {
|
|
|
+ pr_err("%s: failed to find watchdog device\n", __func__);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ davinci_watchdog_reset(to_platform_device(dev));
|
|
|
}
|
|
|
|
|
|
int __init da8xx_register_watchdog(void)
|