2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-20 03:04:01 +08:00

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 <jg1.han@samsung.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
This commit is contained in:
Jingoo Han 2014-02-26 10:17:13 +09:00 committed by Thierry Reding
parent 4407b6d243
commit 8468949cdd

View File

@ -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,