netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] drivers/net: Use of_match_ptr() macro in smc91x.c
@ 2012-12-19 11:17 Sachin Kamat
  2012-12-19 11:17 ` [PATCH 2/2] drivers/net: Use of_match_ptr() macro in smsc911x.c Sachin Kamat
  2012-12-19 20:50 ` [PATCH 1/2] drivers/net: Use of_match_ptr() macro in smc91x.c David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Sachin Kamat @ 2012-12-19 11:17 UTC (permalink / raw)
  To: netdev; +Cc: steve.glendinning, davem, sachin.kamat, patches, nico

This eliminates having an #ifdef returning NULL for the case
when OF is disabled.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
Compile tested on linux-next.
---
 drivers/net/ethernet/smsc/smc91x.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c
index 022b45b..a670d23 100644
--- a/drivers/net/ethernet/smsc/smc91x.c
+++ b/drivers/net/ethernet/smsc/smc91x.c
@@ -2386,8 +2386,6 @@ static const struct of_device_id smc91x_match[] = {
 	{},
 };
 MODULE_DEVICE_TABLE(of, smc91x_match);
-#else
-#define smc91x_match NULL
 #endif
 
 static struct dev_pm_ops smc_drv_pm_ops = {
@@ -2402,7 +2400,7 @@ static struct platform_driver smc_driver = {
 		.name	= CARDNAME,
 		.owner	= THIS_MODULE,
 		.pm	= &smc_drv_pm_ops,
-		.of_match_table = smc91x_match,
+		.of_match_table = of_match_ptr(smc91x_match),
 	},
 };
 
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-12-19 20:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-19 11:17 [PATCH 1/2] drivers/net: Use of_match_ptr() macro in smc91x.c Sachin Kamat
2012-12-19 11:17 ` [PATCH 2/2] drivers/net: Use of_match_ptr() macro in smsc911x.c Sachin Kamat
2012-12-19 20:50   ` David Miller
2012-12-19 20:50 ` [PATCH 1/2] drivers/net: Use of_match_ptr() macro in smc91x.c David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).