Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Sachin Kamat and committed by
Marc Kleine-Budde
1f3e4b0c baffd2e8

+1 -3
+1 -3
drivers/net/can/at91_can.c
··· 1264 1264 } 1265 1265 }; 1266 1266 MODULE_DEVICE_TABLE(of, at91_can_dt_ids); 1267 - #else 1268 - #define at91_can_dt_ids NULL 1269 1267 #endif 1270 1268 1271 1269 static const struct at91_devtype_data *at91_can_get_driver_data(struct platform_device *pdev) ··· 1422 1424 .driver = { 1423 1425 .name = KBUILD_MODNAME, 1424 1426 .owner = THIS_MODULE, 1425 - .of_match_table = at91_can_dt_ids, 1427 + .of_match_table = of_match_ptr(at91_can_dt_ids), 1426 1428 }, 1427 1429 .id_table = at91_can_id_table, 1428 1430 };