Skip to content

Commit

Permalink
net: davinci_mdio: gaurd the DT code with IS_ENABLED(CONFIG_OF)
Browse files Browse the repository at this point in the history
guard the davinci_mdio_of_mtable table and davinci_mdio_probe_dt()
with CONFIG_OF.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Lad, Prabhakar authored and David S. Miller committed Jun 25, 2013
1 parent 151328c commit 277e2a8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/ethernet/ti/davinci_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ static int davinci_mdio_write(struct mii_bus *bus, int phy_id,
return 0;
}

#if IS_ENABLED(CONFIG_OF)
static int davinci_mdio_probe_dt(struct mdio_platform_data *data,
struct platform_device *pdev)
{
Expand All @@ -308,7 +309,7 @@ static int davinci_mdio_probe_dt(struct mdio_platform_data *data,

return 0;
}

#endif

static int davinci_mdio_probe(struct platform_device *pdev)
{
Expand Down Expand Up @@ -477,11 +478,13 @@ static const struct dev_pm_ops davinci_mdio_pm_ops = {
.resume_early = davinci_mdio_resume,
};

#if IS_ENABLED(CONFIG_OF)
static const struct of_device_id davinci_mdio_of_mtable[] = {
{ .compatible = "ti,davinci_mdio", },
{ /* sentinel */ },
};
MODULE_DEVICE_TABLE(of, davinci_mdio_of_mtable);
#endif

static struct platform_driver davinci_mdio_driver = {
.driver = {
Expand Down

0 comments on commit 277e2a8

Please sign in to comment.