watchdog: Remove redundant of_match_ptr
authorSachin Kamat <sachin.kamat@linaro.org>
Mon, 30 Sep 2013 04:42:51 +0000 (10:12 +0530)
committerWim Van Sebroeck <wim@iguana.be>
Sun, 17 Nov 2013 18:37:11 +0000 (19:37 +0100)
of_match_ptr() is a macro used to avoid undefined reference error if
CONFIG_OF is used to selectively compile in or out the
data structure. It is defined as follows:

#ifdef CONFIG_OF
#define of_match_ptr(ptr) ptr
#else
#define of_match_ptr(ptr) NULL
#endif

In the case of this series, none of the drivers use CONFIG_OF macro to
compile out the data structure (i.e., the data structure is always
defined).
Hence the use of of_match_ptr() does not make any sense. Thus removing
it to make the code look simpler for readability.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/at91rm9200_wdt.c
drivers/watchdog/orion_wdt.c
drivers/watchdog/sunxi_wdt.c

index 1c75260b987c13dcd58ef1137c08ac5386709b0a..aa5cb56cf68a26b6ef042c3e5d2d17dadb67e289 100644 (file)
@@ -269,7 +269,7 @@ static struct platform_driver at91wdt_driver = {
        .driver         = {
                .name   = "at91_wdt",
                .owner  = THIS_MODULE,
-               .of_match_table = of_match_ptr(at91_wdt_dt_ids),
+               .of_match_table = at91_wdt_dt_ids,
        },
 };
 
index 4ea5fcccac02d1ee6f933cc1e5b8b8e0260da3a4..34adb540d02c00e46e5e640ad55be789810bf328 100644 (file)
@@ -207,7 +207,7 @@ static struct platform_driver orion_wdt_driver = {
        .driver         = {
                .owner  = THIS_MODULE,
                .name   = "orion_wdt",
-               .of_match_table = of_match_ptr(orion_wdt_of_match_table),
+               .of_match_table = orion_wdt_of_match_table,
        },
 };
 
index f6caa77151c74a4fc827d933715c92c57da5e0b7..76332d893e122a3293ec3d2b6e7230ad354b04a2 100644 (file)
@@ -217,7 +217,7 @@ static struct platform_driver sunxi_wdt_driver = {
        .driver         = {
                .owner          = THIS_MODULE,
                .name           = DRV_NAME,
-               .of_match_table = of_match_ptr(sunxi_wdt_dt_ids)
+               .of_match_table = sunxi_wdt_dt_ids,
        },
 };