watchdog: mpc8xxx: make use of of_device_get_match_data
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 12 Aug 2015 08:15:54 +0000 (10:15 +0200)
committerWim Van Sebroeck <wim@iguana.be>
Wed, 9 Sep 2015 19:36:51 +0000 (21:36 +0200)
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>
drivers/watchdog/mpc8xxx_wdt.c

index e0acda3282d9f68045d0c3c09c8f07f0019fda23..fb1fe967cf57f2c61f8bf5e1f70c90269ff579a4 100644 (file)
@@ -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;
This page took 0.027879 seconds and 5 git commands to generate.