summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-06-12 17:00:39 +0530
committerMarc Kleine-Budde <mkl@pengutronix.de>2013-06-27 15:15:42 +0200
commit1f3e4b0cc4deb9d740261273fbbf5ea95c8434d0 (patch)
tree6f1170d002408309443fc8087cbb5694edc05824
parentbaffd2e8d9a562021f046ed52195aaac91a51412 (diff)
downloadblackbird-obmc-linux-1f3e4b0cc4deb9d740261273fbbf5ea95c8434d0.tar.gz
blackbird-obmc-linux-1f3e4b0cc4deb9d740261273fbbf5ea95c8434d0.zip
can: at91_can: Use of_match_ptr()
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>
-rw-r--r--drivers/net/can/at91_can.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c
index ce8421ac453a..dbbe97ae121e 100644
--- a/drivers/net/can/at91_can.c
+++ b/drivers/net/can/at91_can.c
@@ -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,
};
OpenPOWER on IntegriCloud