Skip to content

Commit 63808bb

Browse files
Uwe Kleine-Königthierryreding
authored andcommitted
pwm: pxa: Don't reimplement of_device_get_match_data()
Apart from the return type pxa_pwm_get_id_dt() reimplements of_device_get_match_data(). Drop the former and replace the call to it by the latter. Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 4aed0cc commit 63808bb

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

drivers/pwm/pwm-pxa.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -157,21 +157,14 @@ MODULE_DEVICE_TABLE(of, pwm_of_match);
157157
#define pwm_of_match NULL
158158
#endif
159159

160-
static const struct platform_device_id *pxa_pwm_get_id_dt(struct device *dev)
161-
{
162-
const struct of_device_id *id = of_match_device(pwm_of_match, dev);
163-
164-
return id ? id->data : NULL;
165-
}
166-
167160
static int pwm_probe(struct platform_device *pdev)
168161
{
169162
const struct platform_device_id *id = platform_get_device_id(pdev);
170163
struct pxa_pwm_chip *pc;
171164
int ret = 0;
172165

173166
if (IS_ENABLED(CONFIG_OF) && id == NULL)
174-
id = pxa_pwm_get_id_dt(&pdev->dev);
167+
id = of_device_get_match_data(&pdev->dev);
175168

176169
if (id == NULL)
177170
return -EINVAL;

0 commit comments

Comments
 (0)