spi: spi-oc-tiny: Use of_match_ptr() macro
authorSachin Kamat <sachin.kamat@linaro.org>
Thu, 14 Mar 2013 10:01:50 +0000 (15:31 +0530)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 1 Apr 2013 13:27:09 +0000 (14:27 +0100)
This eliminates having an #ifdef returning NULL for the case
when OF is disabled.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/spi/spi-oc-tiny.c

index cb2e284..e60a776 100644 (file)
@@ -393,8 +393,6 @@ static const struct of_device_id tiny_spi_match[] = {
        {},
 };
 MODULE_DEVICE_TABLE(of, tiny_spi_match);
-#else /* CONFIG_OF */
-#define tiny_spi_match NULL
 #endif /* CONFIG_OF */
 
 static struct platform_driver tiny_spi_driver = {
@@ -404,7 +402,7 @@ static struct platform_driver tiny_spi_driver = {
                .name = DRV_NAME,
                .owner = THIS_MODULE,
                .pm = NULL,
-               .of_match_table = tiny_spi_match,
+               .of_match_table = of_match_ptr(tiny_spi_match),
        },
 };
 module_platform_driver(tiny_spi_driver);