diff options
Diffstat (limited to 'drivers/watchdog/wm831x_wdt.c')
| -rw-r--r-- | drivers/watchdog/wm831x_wdt.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/watchdog/wm831x_wdt.c b/drivers/watchdog/wm831x_wdt.c index d4e47eda4182..e243bd01c774 100644 --- a/drivers/watchdog/wm831x_wdt.c +++ b/drivers/watchdog/wm831x_wdt.c | |||
| @@ -184,7 +184,7 @@ static const struct watchdog_ops wm831x_wdt_ops = { | |||
| 184 | static int wm831x_wdt_probe(struct platform_device *pdev) | 184 | static int wm831x_wdt_probe(struct platform_device *pdev) |
| 185 | { | 185 | { |
| 186 | struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent); | 186 | struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent); |
| 187 | struct wm831x_pdata *chip_pdata; | 187 | struct wm831x_pdata *chip_pdata = dev_get_platdata(pdev->dev.parent); |
| 188 | struct wm831x_watchdog_pdata *pdata; | 188 | struct wm831x_watchdog_pdata *pdata; |
| 189 | struct wm831x_wdt_drvdata *driver_data; | 189 | struct wm831x_wdt_drvdata *driver_data; |
| 190 | struct watchdog_device *wm831x_wdt; | 190 | struct watchdog_device *wm831x_wdt; |
| @@ -231,12 +231,10 @@ static int wm831x_wdt_probe(struct platform_device *pdev) | |||
| 231 | wm831x_wdt->timeout = wm831x_wdt_cfgs[i].time; | 231 | wm831x_wdt->timeout = wm831x_wdt_cfgs[i].time; |
| 232 | 232 | ||
| 233 | /* Apply any configuration */ | 233 | /* Apply any configuration */ |
| 234 | if (pdev->dev.parent->platform_data) { | 234 | if (chip_pdata) |
| 235 | chip_pdata = pdev->dev.parent->platform_data; | ||
| 236 | pdata = chip_pdata->watchdog; | 235 | pdata = chip_pdata->watchdog; |
| 237 | } else { | 236 | else |
| 238 | pdata = NULL; | 237 | pdata = NULL; |
| 239 | } | ||
| 240 | 238 | ||
| 241 | if (pdata) { | 239 | if (pdata) { |
| 242 | reg &= ~(WM831X_WDOG_SECACT_MASK | WM831X_WDOG_PRIMACT_MASK | | 240 | reg &= ~(WM831X_WDOG_SECACT_MASK | WM831X_WDOG_PRIMACT_MASK | |
