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 /drivers/net/smc911x.c | |
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>
Diffstat (limited to 'drivers/net/smc911x.c')
-rw-r--r-- | drivers/net/smc911x.c | 10 |
1 files changed, 5 insertions, 5 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 = { |