diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2008-11-22 12:36:14 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-30 13:03:37 -0500 |
commit | f57628d76bd201a444ca822f3622522a44acbf60 (patch) | |
tree | 188e3450ed89f197bfb73da036122fdec0848243 | |
parent | 5bac287ea51bb8678c3875d87a536071ef0fd590 (diff) |
section errors in smc911x/smc91x
a) ->probe() can be __devinit; no need to put it into .text
b) calling __init stuff from it, OTOH, is wrong
c) ->remove() is __devexit fodder
Acked-by: rmk+kernel@arm.linux.org.uk
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/net/smc911x.c | 10 | ||||
-rw-r--r-- | drivers/net/smc91x.c | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index b185cd12269c..9a16a79b67d0 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c | |||
@@ -1735,7 +1735,7 @@ static const struct ethtool_ops smc911x_ethtool_ops = { | |||
1735 | * This routine has a simple purpose -- make the SMC chip generate an | 1735 | * This routine has a simple purpose -- make the SMC chip generate an |
1736 | * interrupt, so an auto-detect routine can detect it, and find the IRQ, | 1736 | * interrupt, so an auto-detect routine can detect it, and find the IRQ, |
1737 | */ | 1737 | */ |
1738 | static int __init smc911x_findirq(struct net_device *dev) | 1738 | static int __devinit smc911x_findirq(struct net_device *dev) |
1739 | { | 1739 | { |
1740 | struct smc911x_local *lp = netdev_priv(dev); | 1740 | struct smc911x_local *lp = netdev_priv(dev); |
1741 | int timeout = 20; | 1741 | int timeout = 20; |
@@ -1799,7 +1799,7 @@ static int __init smc911x_findirq(struct net_device *dev) | |||
1799 | * o actually GRAB the irq. | 1799 | * o actually GRAB the irq. |
1800 | * o GRAB the region | 1800 | * o GRAB the region |
1801 | */ | 1801 | */ |
1802 | static int __init smc911x_probe(struct net_device *dev) | 1802 | static int __devinit smc911x_probe(struct net_device *dev) |
1803 | { | 1803 | { |
1804 | struct smc911x_local *lp = netdev_priv(dev); | 1804 | struct smc911x_local *lp = netdev_priv(dev); |
1805 | int i, retval; | 1805 | int i, retval; |
@@ -2048,7 +2048,7 @@ err_out: | |||
2048 | * 0 --> there is a device | 2048 | * 0 --> there is a device |
2049 | * anything else, error | 2049 | * anything else, error |
2050 | */ | 2050 | */ |
2051 | static int smc911x_drv_probe(struct platform_device *pdev) | 2051 | static int __devinit smc911x_drv_probe(struct platform_device *pdev) |
2052 | { | 2052 | { |
2053 | #ifdef SMC_DYNAMIC_BUS_CONFIG | 2053 | #ifdef SMC_DYNAMIC_BUS_CONFIG |
2054 | struct smc911x_platdata *pd = pdev->dev.platform_data; | 2054 | struct smc911x_platdata *pd = pdev->dev.platform_data; |
@@ -2124,7 +2124,7 @@ out: | |||
2124 | return ret; | 2124 | return ret; |
2125 | } | 2125 | } |
2126 | 2126 | ||
2127 | static int smc911x_drv_remove(struct platform_device *pdev) | 2127 | static int __devexit smc911x_drv_remove(struct platform_device *pdev) |
2128 | { | 2128 | { |
2129 | struct net_device *ndev = platform_get_drvdata(pdev); | 2129 | struct net_device *ndev = platform_get_drvdata(pdev); |
2130 | struct smc911x_local *lp = netdev_priv(ndev); | 2130 | struct smc911x_local *lp = netdev_priv(ndev); |
@@ -2195,7 +2195,7 @@ static int smc911x_drv_resume(struct platform_device *dev) | |||
2195 | 2195 | ||
2196 | static struct platform_driver smc911x_driver = { | 2196 | static struct platform_driver smc911x_driver = { |
2197 | .probe = smc911x_drv_probe, | 2197 | .probe = smc911x_drv_probe, |
2198 | .remove = smc911x_drv_remove, | 2198 | .remove = __devexit_p(smc911x_drv_remove), |
2199 | .suspend = smc911x_drv_suspend, | 2199 | .suspend = smc911x_drv_suspend, |
2200 | .resume = smc911x_drv_resume, | 2200 | .resume = smc911x_drv_resume, |
2201 | .driver = { | 2201 | .driver = { |
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c index fc80f250da31..35c56abf4113 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c | |||
@@ -1696,7 +1696,7 @@ static const struct ethtool_ops smc_ethtool_ops = { | |||
1696 | * I just deleted auto_irq.c, since it was never built... | 1696 | * I just deleted auto_irq.c, since it was never built... |
1697 | * --jgarzik | 1697 | * --jgarzik |
1698 | */ | 1698 | */ |
1699 | static int __init smc_findirq(struct smc_local *lp) | 1699 | static int __devinit smc_findirq(struct smc_local *lp) |
1700 | { | 1700 | { |
1701 | void __iomem *ioaddr = lp->base; | 1701 | void __iomem *ioaddr = lp->base; |
1702 | int timeout = 20; | 1702 | int timeout = 20; |
@@ -1770,7 +1770,7 @@ static int __init smc_findirq(struct smc_local *lp) | |||
1770 | * o actually GRAB the irq. | 1770 | * o actually GRAB the irq. |
1771 | * o GRAB the region | 1771 | * o GRAB the region |
1772 | */ | 1772 | */ |
1773 | static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr, | 1773 | static int __devinit smc_probe(struct net_device *dev, void __iomem *ioaddr, |
1774 | unsigned long irq_flags) | 1774 | unsigned long irq_flags) |
1775 | { | 1775 | { |
1776 | struct smc_local *lp = netdev_priv(dev); | 1776 | struct smc_local *lp = netdev_priv(dev); |
@@ -2126,7 +2126,7 @@ static void smc_release_datacs(struct platform_device *pdev, struct net_device * | |||
2126 | * 0 --> there is a device | 2126 | * 0 --> there is a device |
2127 | * anything else, error | 2127 | * anything else, error |
2128 | */ | 2128 | */ |
2129 | static int smc_drv_probe(struct platform_device *pdev) | 2129 | static int __devinit smc_drv_probe(struct platform_device *pdev) |
2130 | { | 2130 | { |
2131 | struct smc91x_platdata *pd = pdev->dev.platform_data; | 2131 | struct smc91x_platdata *pd = pdev->dev.platform_data; |
2132 | struct smc_local *lp; | 2132 | struct smc_local *lp; |
@@ -2240,7 +2240,7 @@ static int smc_drv_probe(struct platform_device *pdev) | |||
2240 | return ret; | 2240 | return ret; |
2241 | } | 2241 | } |
2242 | 2242 | ||
2243 | static int smc_drv_remove(struct platform_device *pdev) | 2243 | static int __devexit smc_drv_remove(struct platform_device *pdev) |
2244 | { | 2244 | { |
2245 | struct net_device *ndev = platform_get_drvdata(pdev); | 2245 | struct net_device *ndev = platform_get_drvdata(pdev); |
2246 | struct smc_local *lp = netdev_priv(ndev); | 2246 | struct smc_local *lp = netdev_priv(ndev); |
@@ -2305,7 +2305,7 @@ static int smc_drv_resume(struct platform_device *dev) | |||
2305 | 2305 | ||
2306 | static struct platform_driver smc_driver = { | 2306 | static struct platform_driver smc_driver = { |
2307 | .probe = smc_drv_probe, | 2307 | .probe = smc_drv_probe, |
2308 | .remove = smc_drv_remove, | 2308 | .remove = __devexit_p(smc_drv_remove), |
2309 | .suspend = smc_drv_suspend, | 2309 | .suspend = smc_drv_suspend, |
2310 | .resume = smc_drv_resume, | 2310 | .resume = smc_drv_resume, |
2311 | .driver = { | 2311 | .driver = { |