projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
313b78e
)
pwm: atmel: Use of_device_get_match_data()
author
Thierry Reding
<thierry.reding@gmail.com>
Mon, 11 Jul 2016 10:16:01 +0000
(12:16 +0200)
committer
Thierry Reding
<thierry.reding@gmail.com>
Mon, 11 Jul 2016 10:49:36 +0000
(12:49 +0200)
Use of_device_get_match_data() instead of an open-coded variant.
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-atmel.c
patch
|
blob
|
history
diff --git
a/drivers/pwm/pwm-atmel.c
b/drivers/pwm/pwm-atmel.c
index 8083015b8641d0d282c8b3e3249c4fac7e7e15e4..e6b8b1b7e6ba7ddcbb2fa6142b2ba33ff0af777e 100644
(file)
--- a/
drivers/pwm/pwm-atmel.c
+++ b/
drivers/pwm/pwm-atmel.c
@@
-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);