diff mbox

pwm: pxa: Use of_match_ptr()

Message ID 002c01cf3290$7ad36ef0$707a4cd0$%han@samsung.com
State Accepted
Headers show

Commit Message

Jingoo Han Feb. 26, 2014, 1:17 a.m. UTC
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>
---
 drivers/pwm/pwm-pxa.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Thierry Reding Feb. 26, 2014, 3:17 p.m. UTC | #1
On Wed, Feb 26, 2014 at 10:17:13AM +0900, Jingoo Han wrote:
> 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>
> ---
>  drivers/pwm/pwm-pxa.c |    4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

Applied, thanks.

Thierry
diff mbox

Patch

diff --git a/drivers/pwm/pwm-pxa.c b/drivers/pwm/pwm-pxa.c
index 8d99573..7eb2c18 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[] = {
 	{ }
 };
 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,