Commit 277e2a84 authored by Lad, Prabhakar's avatar Lad, Prabhakar Committed by David S. Miller

net: davinci_mdio: gaurd the DT code with IS_ENABLED(CONFIG_OF)

guard the davinci_mdio_of_mtable table and davinci_mdio_probe_dt()
with CONFIG_OF.
Signed-off-by: default avatarLad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 151328c8
...@@ -291,6 +291,7 @@ static int davinci_mdio_write(struct mii_bus *bus, int phy_id, ...@@ -291,6 +291,7 @@ static int davinci_mdio_write(struct mii_bus *bus, int phy_id,
return 0; return 0;
} }
#if IS_ENABLED(CONFIG_OF)
static int davinci_mdio_probe_dt(struct mdio_platform_data *data, static int davinci_mdio_probe_dt(struct mdio_platform_data *data,
struct platform_device *pdev) struct platform_device *pdev)
{ {
...@@ -308,7 +309,7 @@ static int davinci_mdio_probe_dt(struct mdio_platform_data *data, ...@@ -308,7 +309,7 @@ static int davinci_mdio_probe_dt(struct mdio_platform_data *data,
return 0; return 0;
} }
#endif
static int davinci_mdio_probe(struct platform_device *pdev) static int davinci_mdio_probe(struct platform_device *pdev)
{ {
...@@ -477,11 +478,13 @@ static const struct dev_pm_ops davinci_mdio_pm_ops = { ...@@ -477,11 +478,13 @@ static const struct dev_pm_ops davinci_mdio_pm_ops = {
.resume_early = davinci_mdio_resume, .resume_early = davinci_mdio_resume,
}; };
#if IS_ENABLED(CONFIG_OF)
static const struct of_device_id davinci_mdio_of_mtable[] = { static const struct of_device_id davinci_mdio_of_mtable[] = {
{ .compatible = "ti,davinci_mdio", }, { .compatible = "ti,davinci_mdio", },
{ /* sentinel */ }, { /* sentinel */ },
}; };
MODULE_DEVICE_TABLE(of, davinci_mdio_of_mtable); MODULE_DEVICE_TABLE(of, davinci_mdio_of_mtable);
#endif
static struct platform_driver davinci_mdio_driver = { static struct platform_driver davinci_mdio_driver = {
.driver = { .driver = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment