提交 017bb04e 编写于 作者: T Thierry Reding

pwm: atmel: Use of_device_get_match_data()

Use of_device_get_match_data() instead of an open-coded variant.
Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
上级 313b78ef
......@@ -337,15 +337,8 @@ atmel_pwm_get_driver_data(struct platform_device *pdev)
{
const struct platform_device_id *id;
if (pdev->dev.of_node) {
const struct of_device_id *match;
match = of_match_device(atmel_pwm_dt_ids, &pdev->dev);
if (!match)
return NULL;
return match->data;
}
if (pdev->dev.of_node)
return of_device_get_match_data(&pdev->dev);
id = platform_get_device_id(pdev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册