summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/xrs700x
diff options
context:
space:
mode:
authorGeorge McCollister <george.mccollister@gmail.com>2021-02-09 15:12:56 -0600
committerDavid S. Miller <davem@davemloft.net>2021-02-11 13:17:04 -0800
commitf8a7e0145d58f53647c43fd9dd913da190c6c253 (patch)
tree23186600a2263f6c9b094ab81a86b88ffd4fe143 /drivers/net/dsa/xrs700x
parent3e0103a35a46b5f3dc7e3fe0f09eb2fc5e0456e6 (diff)
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>
Diffstat (limited to 'drivers/net/dsa/xrs700x')
-rw-r--r--drivers/net/dsa/xrs700x/xrs700x_mdio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/dsa/xrs700x/xrs700x_mdio.c b/drivers/net/dsa/xrs700x/xrs700x_mdio.c
index 3b3b78f20263..44f58bee04a4 100644
--- a/drivers/net/dsa/xrs700x/xrs700x_mdio.c
+++ b/drivers/net/dsa/xrs700x/xrs700x_mdio.c
@@ -10,6 +10,7 @@
#include <linux/module.h>
#include <linux/phy.h>
#include <linux/if_vlan.h>
+#include <linux/of.h>
#include "xrs700x.h"
#include "xrs700x_reg.h"
@@ -150,7 +151,7 @@ MODULE_DEVICE_TABLE(of, xrs700x_mdio_dt_ids);
static struct mdio_driver xrs700x_mdio_driver = {
.mdiodrv.driver = {
.name = "xrs700x-mdio",
- .of_match_table = xrs700x_mdio_dt_ids,
+ .of_match_table = of_match_ptr(xrs700x_mdio_dt_ids),
},
.probe = xrs700x_mdio_probe,
.remove = xrs700x_mdio_remove,