aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pwm
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2014-02-25 20:17:13 -0500
committerThierry Reding <thierry.reding@gmail.com>2014-02-26 10:14:57 -0500
commit8468949cddcdbb1b1b1bc552aefceb252078ceb1 (patch)
treedede1c8cfecbc240aae84b81388432a9a630e672 /drivers/pwm
parent4407b6d243293e84546f4b1dbbe1ed8e9d797a6c (diff)
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>
Diffstat (limited to 'drivers/pwm')
-rw-r--r--drivers/pwm/pwm-pxa.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pwm/pwm-pxa.c b/drivers/pwm/pwm-pxa.c
index 8d995731cef8..7eb2c181c25a 100644
--- a/drivers/pwm/pwm-pxa.c
+++ b/drivers/pwm/pwm-pxa.c
@@ -140,8 +140,6 @@ static struct of_device_id pwm_of_match[] = {
140 { } 140 { }
141}; 141};
142MODULE_DEVICE_TABLE(of, pwm_of_match); 142MODULE_DEVICE_TABLE(of, pwm_of_match);
143#else
144#define pwm_of_match NULL
145#endif 143#endif
146 144
147static const struct platform_device_id *pxa_pwm_get_id_dt(struct device *dev) 145static const struct platform_device_id *pxa_pwm_get_id_dt(struct device *dev)
@@ -228,7 +226,7 @@ static struct platform_driver pwm_driver = {
228 .driver = { 226 .driver = {
229 .name = "pxa25x-pwm", 227 .name = "pxa25x-pwm",
230 .owner = THIS_MODULE, 228 .owner = THIS_MODULE,
231 .of_match_table = pwm_of_match, 229 .of_match_table = of_match_ptr(pwm_of_match),
232 }, 230 },
233 .probe = pwm_probe, 231 .probe = pwm_probe,
234 .remove = pwm_remove, 232 .remove = pwm_remove,