diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2015-08-12 08:15:54 (GMT) |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2015-09-09 19:36:51 (GMT) |
commit | f0ded83b96d27b27db0015e701cfd916330e3c50 (patch) | |
tree | e6a76d2c1ab6cc380257bbed709b9f765eff0d04 | |
parent | 50ffb53ef2311e4631086d27783b00db6859c60e (diff) | |
download | linux-f0ded83b96d27b27db0015e701cfd916330e3c50.tar.xz |
watchdog: mpc8xxx: make use of of_device_get_match_data
This function is new in v4.2-rc1 and makes a forward declaration of the
match table superfluous which can so be removed.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
-rw-r--r-- | drivers/watchdog/mpc8xxx_wdt.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c index e0acda3..fb1fe967 100644 --- a/drivers/watchdog/mpc8xxx_wdt.c +++ b/drivers/watchdog/mpc8xxx_wdt.c @@ -139,7 +139,6 @@ static struct watchdog_device mpc8xxx_wdt_dev = { .ops = &mpc8xxx_wdt_ops, }; -static const struct of_device_id mpc8xxx_wdt_match[]; static int mpc8xxx_wdt_probe(struct platform_device *ofdev) { int ret; @@ -150,10 +149,9 @@ static int mpc8xxx_wdt_probe(struct platform_device *ofdev) bool enabled; unsigned int timeout_sec; - match = of_match_device(mpc8xxx_wdt_match, &ofdev->dev); - if (!match) + wdt_type = of_device_get_match_data(&ofdev->dev); + if (!wdt_type) return -EINVAL; - wdt_type = match->data; if (!freq || freq == -1) return -EINVAL; |