pwm: pxa: Use of_match_ptr()
PATCH 1/1 pwm: pxa: Use of_match_ptr()
Use of_match_ptr(), because of_match_ptr() returns NULL pointer when CONFIG_OF is disabled.
Signed-off-by Jingoo Han <[email protected]>
--- drivers/pwm/pwm-pxa.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/pwm/pwm-pxa.c +1 -3
@@ -140,8 +140,6 @@ static struct of_device_id pwm_of_match[] = { { } };MODULE_DEVICE_TABLE (of, pwm_of_match); -#else -#define pwm_of_match NULL#endif static const struct platform_device_id *pxa_pwm_get_id_dt (struct device *dev)
@@ -228,7 +226,7 @@ static struct platform_driver pwm_driver = { .driver = { .name = "pxa25x-pwm", .owner = THIS_MODULE, - .of_match_table = pwm_of_match, + .of_match_table = of_match_ptr(pwm_of_match), }, .probe = pwm_probe, .remove = pwm_remove,
Signature · 1 line
1.7.10.4
Thierry Reding
AppliedQuoted 7 lines · Jingoo Han
Use
of_match_ptr(), becauseof_match_ptr()returns NULL pointer whenCONFIG_OFis disabled.Signed-off-by Jingoo Han <[email protected]>--- drivers/pwm/pwm-pxa.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
Applied, thanks.
Thierry