diff options
Diffstat (limited to 'drivers/pwm/pwm-atmel.c')
| -rw-r--r-- | drivers/pwm/pwm-atmel.c | 11 |
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) | |||
| 337 | { | 337 | { |
| 338 | const struct platform_device_id *id; | 338 | const struct platform_device_id *id; |
| 339 | 339 | ||
| 340 | if (pdev->dev.of_node) { | 340 | if (pdev->dev.of_node) |
| 341 | const struct of_device_id *match; | 341 | return of_device_get_match_data(&pdev->dev); |
| 342 | |||
| 343 | match = of_match_device(atmel_pwm_dt_ids, &pdev->dev); | ||
| 344 | if (!match) | ||
| 345 | return NULL; | ||
| 346 | |||
| 347 | return match->data; | ||
| 348 | } | ||
| 349 | 342 | ||
| 350 | id = platform_get_device_id(pdev); | 343 | id = platform_get_device_id(pdev); |
| 351 | 344 | ||
