aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/smc91x.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-11-03 03:04:24 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-03 03:19:31 -0500
commit55c8eb6c8eaa5009eed1557b296da5d4ea9c369a (patch)
tree1bdd736112e6ace457a447e1dc43f33188f1eb83 /drivers/net/smc91x.c
parent0856f93958c488f0cc656be53c26dfd20663bdb3 (diff)
SMC91x: Fix compilation on some platforms.
This reverts 51ac3beffd4afaea4350526cf01fe74aaff25eff ('SMC91x: delete unused local variable "lp"') and adds __maybe_unused markers to these (potentially) unused variables. The issue is that in some configurations SMC_IO_SHIFT evaluates to '(lp->io_shift)', but in some others it's plain '0'. Based upon a build failure report from Manuel Lauss. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/smc91x.c')
-rw-r--r--drivers/net/smc91x.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index 6f9895d4e5bd..fc80f250da31 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -2060,6 +2060,7 @@ static int smc_request_attrib(struct platform_device *pdev,
2060 struct net_device *ndev) 2060 struct net_device *ndev)
2061{ 2061{
2062 struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib"); 2062 struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib");
2063 struct smc_local *lp __maybe_unused = netdev_priv(ndev);
2063 2064
2064 if (!res) 2065 if (!res)
2065 return 0; 2066 return 0;
@@ -2074,6 +2075,7 @@ static void smc_release_attrib(struct platform_device *pdev,
2074 struct net_device *ndev) 2075 struct net_device *ndev)
2075{ 2076{
2076 struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib"); 2077 struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib");
2078 struct smc_local *lp __maybe_unused = netdev_priv(ndev);
2077 2079
2078 if (res) 2080 if (res)
2079 release_mem_region(res->start, ATTRIB_SIZE); 2081 release_mem_region(res->start, ATTRIB_SIZE);