diff options
author | Lad, Prabhakar <prabhakar.csengg@gmail.com> | 2013-06-25 11:54:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-25 19:52:29 -0400 |
commit | 277e2a84c12e0d4af77d0f0a52623211eb6ab223 (patch) | |
tree | 8a60cab6358b0c78e07ac48822e558a85d5fda1b /drivers/net/ethernet/ti | |
parent | 151328c828795574bed6ce8b37c3d0bd586e162f (diff) |
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: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti')
-rw-r--r-- | drivers/net/ethernet/ti/davinci_mdio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c index c47f0dbcebb5..dac6f5832d18 100644 --- a/drivers/net/ethernet/ti/davinci_mdio.c +++ b/drivers/net/ethernet/ti/davinci_mdio.c | |||
@@ -291,6 +291,7 @@ static int davinci_mdio_write(struct mii_bus *bus, int phy_id, | |||
291 | return 0; | 291 | return 0; |
292 | } | 292 | } |
293 | 293 | ||
294 | #if IS_ENABLED(CONFIG_OF) | ||
294 | static int davinci_mdio_probe_dt(struct mdio_platform_data *data, | 295 | static int davinci_mdio_probe_dt(struct mdio_platform_data *data, |
295 | struct platform_device *pdev) | 296 | struct platform_device *pdev) |
296 | { | 297 | { |
@@ -308,7 +309,7 @@ static int davinci_mdio_probe_dt(struct mdio_platform_data *data, | |||
308 | 309 | ||
309 | return 0; | 310 | return 0; |
310 | } | 311 | } |
311 | 312 | #endif | |
312 | 313 | ||
313 | static int davinci_mdio_probe(struct platform_device *pdev) | 314 | static int davinci_mdio_probe(struct platform_device *pdev) |
314 | { | 315 | { |
@@ -477,11 +478,13 @@ static const struct dev_pm_ops davinci_mdio_pm_ops = { | |||
477 | .resume_early = davinci_mdio_resume, | 478 | .resume_early = davinci_mdio_resume, |
478 | }; | 479 | }; |
479 | 480 | ||
481 | #if IS_ENABLED(CONFIG_OF) | ||
480 | static const struct of_device_id davinci_mdio_of_mtable[] = { | 482 | static const struct of_device_id davinci_mdio_of_mtable[] = { |
481 | { .compatible = "ti,davinci_mdio", }, | 483 | { .compatible = "ti,davinci_mdio", }, |
482 | { /* sentinel */ }, | 484 | { /* sentinel */ }, |
483 | }; | 485 | }; |
484 | MODULE_DEVICE_TABLE(of, davinci_mdio_of_mtable); | 486 | MODULE_DEVICE_TABLE(of, davinci_mdio_of_mtable); |
487 | #endif | ||
485 | 488 | ||
486 | static struct platform_driver davinci_mdio_driver = { | 489 | static struct platform_driver davinci_mdio_driver = { |
487 | .driver = { | 490 | .driver = { |