提交 f0ded83b 编写于 作者: U Uwe Kleine-König 提交者: Wim Van Sebroeck

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: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
上级 50ffb53e
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册