pwm: pxa: Use of_match_ptr()
authorJingoo Han <jg1.han@samsung.com>
Wed, 26 Feb 2014 01:17:13 +0000 (10:17 +0900)
committerThierry Reding <thierry.reding@gmail.com>
Wed, 26 Feb 2014 15:14:57 +0000 (16:14 +0100)
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>
drivers/pwm/pwm-pxa.c

index 8d995731cef8d13a96f8168161a038c7446e3d5a..7eb2c181c25a45eb0f025eb17fbbf1ead8760e55 100644 (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,
This page took 0.065595 seconds and 5 git commands to generate.