diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-12-18 20:17:10 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-12-19 15:50:07 -0500 |
commit | d62fdf8b681550881b3fb85f335eaf8e36b971b7 (patch) | |
tree | 4b81bf4597ec7e440140fc5499db15e41f479a80 /drivers/net | |
parent | 89ce376c6bdc936515147ff14f8a62cead965683 (diff) |
drivers/net: Use of_match_ptr() macro in smsc911x.c
Add CONFIG_OF guard and use of_match_ptr macro.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/smsc/smsc911x.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c index 4616bf27d515..e112877d15d3 100644 --- a/drivers/net/ethernet/smsc/smsc911x.c +++ b/drivers/net/ethernet/smsc/smsc911x.c | |||
@@ -2575,11 +2575,13 @@ static const struct dev_pm_ops smsc911x_pm_ops = { | |||
2575 | #define SMSC911X_PM_OPS NULL | 2575 | #define SMSC911X_PM_OPS NULL |
2576 | #endif | 2576 | #endif |
2577 | 2577 | ||
2578 | #ifdef CONFIG_OF | ||
2578 | static const struct of_device_id smsc911x_dt_ids[] = { | 2579 | static const struct of_device_id smsc911x_dt_ids[] = { |
2579 | { .compatible = "smsc,lan9115", }, | 2580 | { .compatible = "smsc,lan9115", }, |
2580 | { /* sentinel */ } | 2581 | { /* sentinel */ } |
2581 | }; | 2582 | }; |
2582 | MODULE_DEVICE_TABLE(of, smsc911x_dt_ids); | 2583 | MODULE_DEVICE_TABLE(of, smsc911x_dt_ids); |
2584 | #endif | ||
2583 | 2585 | ||
2584 | static struct platform_driver smsc911x_driver = { | 2586 | static struct platform_driver smsc911x_driver = { |
2585 | .probe = smsc911x_drv_probe, | 2587 | .probe = smsc911x_drv_probe, |
@@ -2588,7 +2590,7 @@ static struct platform_driver smsc911x_driver = { | |||
2588 | .name = SMSC_CHIPNAME, | 2590 | .name = SMSC_CHIPNAME, |
2589 | .owner = THIS_MODULE, | 2591 | .owner = THIS_MODULE, |
2590 | .pm = SMSC911X_PM_OPS, | 2592 | .pm = SMSC911X_PM_OPS, |
2591 | .of_match_table = smsc911x_dt_ids, | 2593 | .of_match_table = of_match_ptr(smsc911x_dt_ids), |
2592 | }, | 2594 | }, |
2593 | }; | 2595 | }; |
2594 | 2596 | ||