Skip to content

Commit

Permalink
net: dsa: xrs700x: use of_match_ptr() on xrs700x_mdio_dt_ids
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
George McCollister authored and David S. Miller committed Feb 11, 2021
1 parent 3e0103a commit f8a7e01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/dsa/xrs700x/xrs700x_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit f8a7e01

Please sign in to comment.