]> Pileus Git - ~andy/linux/commitdiff
can: at91_can: Use of_match_ptr()
authorSachin Kamat <sachin.kamat@linaro.org>
Wed, 12 Jun 2013 11:30:39 +0000 (17:00 +0530)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 27 Jun 2013 13:15:42 +0000 (15:15 +0200)
of_match_ptr() 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: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/at91_can.c

index ce8421ac453a4d5a0252b1b0e6b4d87e6acb6f91..dbbe97ae121e50a97610ed35a84e793d79fbf900 100644 (file)
@@ -1264,8 +1264,6 @@ static const struct of_device_id at91_can_dt_ids[] = {
        }
 };
 MODULE_DEVICE_TABLE(of, at91_can_dt_ids);
-#else
-#define at91_can_dt_ids NULL
 #endif
 
 static const struct at91_devtype_data *at91_can_get_driver_data(struct platform_device *pdev)
@@ -1424,7 +1422,7 @@ static struct platform_driver at91_can_driver = {
        .driver = {
                .name = KBUILD_MODNAME,
                .owner = THIS_MODULE,
-               .of_match_table = at91_can_dt_ids,
+               .of_match_table = of_match_ptr(at91_can_dt_ids),
        },
        .id_table = at91_can_id_table,
 };