drivers: uio_pdrv_genirq: Use of_match_ptr() macro
authorSachin Kamat <sachin.kamat@linaro.org>
Tue, 25 Jun 2013 04:29:52 +0000 (09:59 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Jun 2013 00:22:30 +0000 (17:22 -0700)
This eliminates having an #ifdef returning NULL for the case
when OF is disabled.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/uio/uio_pdrv_genirq.c

index bcd72f3..4eb8eaf 100644 (file)
@@ -271,11 +271,8 @@ static struct of_device_id uio_of_genirq_match[] = {
        { /* Sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, uio_of_genirq_match);
-
 module_param_string(of_id, uio_of_genirq_match[0].compatible, 128, 0);
 MODULE_PARM_DESC(of_id, "Openfirmware id of the device to be handled by uio");
-#else
-# define uio_of_genirq_match NULL
 #endif
 
 static struct platform_driver uio_pdrv_genirq = {
@@ -285,7 +282,7 @@ static struct platform_driver uio_pdrv_genirq = {
                .name = DRIVER_NAME,
                .owner = THIS_MODULE,
                .pm = &uio_pdrv_genirq_dev_pm_ops,
-               .of_match_table = uio_of_genirq_match,
+               .of_match_table = of_match_ptr(uio_of_genirq_match),
        },
 };