Commit be12502e authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by David S. Miller

drivers: net: ethernet: remove incorrect __exit markups

Even if bus is not hot-pluggable, devices can be unbound from the
driver via sysfs, so we should not be using __exit annotations on
remove() methods. The only exception is drivers registered with
platform_driver_probe() which specifically disables sysfs bind/unbind
attributes.
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7db92362
...@@ -1276,18 +1276,6 @@ static int dec_lance_probe(struct device *bdev, const int type) ...@@ -1276,18 +1276,6 @@ static int dec_lance_probe(struct device *bdev, const int type)
return ret; return ret;
} }
static void __exit dec_lance_remove(struct device *bdev)
{
struct net_device *dev = dev_get_drvdata(bdev);
resource_size_t start, len;
unregister_netdev(dev);
start = to_tc_dev(bdev)->resource.start;
len = to_tc_dev(bdev)->resource.end - start + 1;
release_mem_region(start, len);
free_netdev(dev);
}
/* Find all the lance cards on the system and initialize them */ /* Find all the lance cards on the system and initialize them */
static int __init dec_lance_platform_probe(void) static int __init dec_lance_platform_probe(void)
{ {
...@@ -1320,7 +1308,7 @@ static void __exit dec_lance_platform_remove(void) ...@@ -1320,7 +1308,7 @@ static void __exit dec_lance_platform_remove(void)
#ifdef CONFIG_TC #ifdef CONFIG_TC
static int dec_lance_tc_probe(struct device *dev); static int dec_lance_tc_probe(struct device *dev);
static int __exit dec_lance_tc_remove(struct device *dev); static int dec_lance_tc_remove(struct device *dev);
static const struct tc_device_id dec_lance_tc_table[] = { static const struct tc_device_id dec_lance_tc_table[] = {
{ "DEC ", "PMAD-AA " }, { "DEC ", "PMAD-AA " },
...@@ -1334,7 +1322,7 @@ static struct tc_driver dec_lance_tc_driver = { ...@@ -1334,7 +1322,7 @@ static struct tc_driver dec_lance_tc_driver = {
.name = "declance", .name = "declance",
.bus = &tc_bus_type, .bus = &tc_bus_type,
.probe = dec_lance_tc_probe, .probe = dec_lance_tc_probe,
.remove = __exit_p(dec_lance_tc_remove), .remove = dec_lance_tc_remove,
}, },
}; };
...@@ -1346,7 +1334,19 @@ static int dec_lance_tc_probe(struct device *dev) ...@@ -1346,7 +1334,19 @@ static int dec_lance_tc_probe(struct device *dev)
return status; return status;
} }
static int __exit dec_lance_tc_remove(struct device *dev) static void dec_lance_remove(struct device *bdev)
{
struct net_device *dev = dev_get_drvdata(bdev);
resource_size_t start, len;
unregister_netdev(dev);
start = to_tc_dev(bdev)->resource.start;
len = to_tc_dev(bdev)->resource.end - start + 1;
release_mem_region(start, len);
free_netdev(dev);
}
static int dec_lance_tc_remove(struct device *dev)
{ {
put_device(dev); put_device(dev);
dec_lance_remove(dev); dec_lance_remove(dev);
......
...@@ -2617,7 +2617,7 @@ static int sbmac_probe(struct platform_device *pldev) ...@@ -2617,7 +2617,7 @@ static int sbmac_probe(struct platform_device *pldev)
return err; return err;
} }
static int __exit sbmac_remove(struct platform_device *pldev) static int sbmac_remove(struct platform_device *pldev)
{ {
struct net_device *dev = platform_get_drvdata(pldev); struct net_device *dev = platform_get_drvdata(pldev);
struct sbmac_softc *sc = netdev_priv(dev); struct sbmac_softc *sc = netdev_priv(dev);
...@@ -2634,7 +2634,7 @@ static int __exit sbmac_remove(struct platform_device *pldev) ...@@ -2634,7 +2634,7 @@ static int __exit sbmac_remove(struct platform_device *pldev)
static struct platform_driver sbmac_driver = { static struct platform_driver sbmac_driver = {
.probe = sbmac_probe, .probe = sbmac_probe,
.remove = __exit_p(sbmac_remove), .remove = sbmac_remove,
.driver = { .driver = {
.name = sbmac_string, .name = sbmac_string,
}, },
......
...@@ -1456,7 +1456,7 @@ static int ftgmac100_probe(struct platform_device *pdev) ...@@ -1456,7 +1456,7 @@ static int ftgmac100_probe(struct platform_device *pdev)
return err; return err;
} }
static int __exit ftgmac100_remove(struct platform_device *pdev) static int ftgmac100_remove(struct platform_device *pdev)
{ {
struct net_device *netdev; struct net_device *netdev;
struct ftgmac100 *priv; struct ftgmac100 *priv;
...@@ -1483,7 +1483,7 @@ MODULE_DEVICE_TABLE(of, ftgmac100_of_match); ...@@ -1483,7 +1483,7 @@ MODULE_DEVICE_TABLE(of, ftgmac100_of_match);
static struct platform_driver ftgmac100_driver = { static struct platform_driver ftgmac100_driver = {
.probe = ftgmac100_probe, .probe = ftgmac100_probe,
.remove = __exit_p(ftgmac100_remove), .remove = ftgmac100_remove,
.driver = { .driver = {
.name = DRV_NAME, .name = DRV_NAME,
.of_match_table = ftgmac100_of_match, .of_match_table = ftgmac100_of_match,
......
...@@ -1156,7 +1156,7 @@ static int ftmac100_probe(struct platform_device *pdev) ...@@ -1156,7 +1156,7 @@ static int ftmac100_probe(struct platform_device *pdev)
return err; return err;
} }
static int __exit ftmac100_remove(struct platform_device *pdev) static int ftmac100_remove(struct platform_device *pdev)
{ {
struct net_device *netdev; struct net_device *netdev;
struct ftmac100 *priv; struct ftmac100 *priv;
...@@ -1176,7 +1176,7 @@ static int __exit ftmac100_remove(struct platform_device *pdev) ...@@ -1176,7 +1176,7 @@ static int __exit ftmac100_remove(struct platform_device *pdev)
static struct platform_driver ftmac100_driver = { static struct platform_driver ftmac100_driver = {
.probe = ftmac100_probe, .probe = ftmac100_probe,
.remove = __exit_p(ftmac100_remove), .remove = ftmac100_remove,
.driver = { .driver = {
.name = DRV_NAME, .name = DRV_NAME,
}, },
......
...@@ -807,7 +807,7 @@ static int sgiseeq_probe(struct platform_device *pdev) ...@@ -807,7 +807,7 @@ static int sgiseeq_probe(struct platform_device *pdev)
return err; return err;
} }
static int __exit sgiseeq_remove(struct platform_device *pdev) static int sgiseeq_remove(struct platform_device *pdev)
{ {
struct net_device *dev = platform_get_drvdata(pdev); struct net_device *dev = platform_get_drvdata(pdev);
struct sgiseeq_private *sp = netdev_priv(dev); struct sgiseeq_private *sp = netdev_priv(dev);
...@@ -822,7 +822,7 @@ static int __exit sgiseeq_remove(struct platform_device *pdev) ...@@ -822,7 +822,7 @@ static int __exit sgiseeq_remove(struct platform_device *pdev)
static struct platform_driver sgiseeq_driver = { static struct platform_driver sgiseeq_driver = {
.probe = sgiseeq_probe, .probe = sgiseeq_probe,
.remove = __exit_p(sgiseeq_remove), .remove = sgiseeq_remove,
.driver = { .driver = {
.name = "sgiseeq", .name = "sgiseeq",
} }
......
...@@ -854,7 +854,7 @@ static int meth_probe(struct platform_device *pdev) ...@@ -854,7 +854,7 @@ static int meth_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int __exit meth_remove(struct platform_device *pdev) static int meth_remove(struct platform_device *pdev)
{ {
struct net_device *dev = platform_get_drvdata(pdev); struct net_device *dev = platform_get_drvdata(pdev);
...@@ -866,7 +866,7 @@ static int __exit meth_remove(struct platform_device *pdev) ...@@ -866,7 +866,7 @@ static int __exit meth_remove(struct platform_device *pdev)
static struct platform_driver meth_driver = { static struct platform_driver meth_driver = {
.probe = meth_probe, .probe = meth_probe,
.remove = __exit_p(meth_remove), .remove = meth_remove,
.driver = { .driver = {
.name = "meth", .name = "meth",
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment