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

net: dsa: xrs700x: use of_match_ptr() on xrs700x_mdio_dt_ids

Use of_match_ptr() on xrs700x_mdio_dt_ids so that NULL is substituted
when CONFIG_OF isn't defined. This will prevent unnecessary use of
xrs700x_mdio_dt_ids when CONFIG_OF isn't defined.

Signed-off-by: George McCollister <george.mccollister@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

George McCollister and committed by
David S. Miller
f8a7e014 3e0103a3

+2 -1
+2 -1
drivers/net/dsa/xrs700x/xrs700x_mdio.c
··· 10 10 #include <linux/module.h> 11 11 #include <linux/phy.h> 12 12 #include <linux/if_vlan.h> 13 + #include <linux/of.h> 13 14 #include "xrs700x.h" 14 15 #include "xrs700x_reg.h" 15 16 ··· 151 150 static struct mdio_driver xrs700x_mdio_driver = { 152 151 .mdiodrv.driver = { 153 152 .name = "xrs700x-mdio", 154 - .of_match_table = xrs700x_mdio_dt_ids, 153 + .of_match_table = of_match_ptr(xrs700x_mdio_dt_ids), 155 154 }, 156 155 .probe = xrs700x_mdio_probe, 157 156 .remove = xrs700x_mdio_remove,