summaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-atmel.c
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@gmail.com>2016-07-11 13:16:01 +0300
committerThierry Reding <thierry.reding@gmail.com>2016-07-11 13:49:36 +0300
commit017bb04e846be82715769799aafa934feab0e443 (patch)
treed30fd5a01c086356b3ecd456a3a439f82b4aadf7 /drivers/pwm/pwm-atmel.c
parent313b78efea71229e0c48d50ed5527a3c34f3e4eb (diff)
downloadlinux-017bb04e846be82715769799aafa934feab0e443.tar.xz
pwm: atmel: Use of_device_get_match_data()
Use of_device_get_match_data() instead of an open-coded variant. Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/pwm-atmel.c')
-rw-r--r--drivers/pwm/pwm-atmel.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/pwm/pwm-atmel.c b/drivers/pwm/pwm-atmel.c
index 8083015b8641..e6b8b1b7e6ba 100644
--- 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);