Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Dmitry Torokhov and committed by
David S. Miller
be12502e 7db92362

+25 -25
+15 -15
drivers/net/ethernet/amd/declance.c
··· 1276 1276 return ret; 1277 1277 } 1278 1278 1279 - static void __exit dec_lance_remove(struct device *bdev) 1280 - { 1281 - struct net_device *dev = dev_get_drvdata(bdev); 1282 - resource_size_t start, len; 1283 - 1284 - unregister_netdev(dev); 1285 - start = to_tc_dev(bdev)->resource.start; 1286 - len = to_tc_dev(bdev)->resource.end - start + 1; 1287 - release_mem_region(start, len); 1288 - free_netdev(dev); 1289 - } 1290 - 1291 1279 /* Find all the lance cards on the system and initialize them */ 1292 1280 static int __init dec_lance_platform_probe(void) 1293 1281 { ··· 1308 1320 1309 1321 #ifdef CONFIG_TC 1310 1322 static int dec_lance_tc_probe(struct device *dev); 1311 - static int __exit dec_lance_tc_remove(struct device *dev); 1323 + static int dec_lance_tc_remove(struct device *dev); 1312 1324 1313 1325 static const struct tc_device_id dec_lance_tc_table[] = { 1314 1326 { "DEC ", "PMAD-AA " }, ··· 1322 1334 .name = "declance", 1323 1335 .bus = &tc_bus_type, 1324 1336 .probe = dec_lance_tc_probe, 1325 - .remove = __exit_p(dec_lance_tc_remove), 1337 + .remove = dec_lance_tc_remove, 1326 1338 }, 1327 1339 }; 1328 1340 ··· 1334 1346 return status; 1335 1347 } 1336 1348 1337 - static int __exit dec_lance_tc_remove(struct device *dev) 1349 + static void dec_lance_remove(struct device *bdev) 1350 + { 1351 + struct net_device *dev = dev_get_drvdata(bdev); 1352 + resource_size_t start, len; 1353 + 1354 + unregister_netdev(dev); 1355 + start = to_tc_dev(bdev)->resource.start; 1356 + len = to_tc_dev(bdev)->resource.end - start + 1; 1357 + release_mem_region(start, len); 1358 + free_netdev(dev); 1359 + } 1360 + 1361 + static int dec_lance_tc_remove(struct device *dev) 1338 1362 { 1339 1363 put_device(dev); 1340 1364 dec_lance_remove(dev);
+2 -2
drivers/net/ethernet/broadcom/sb1250-mac.c
··· 2617 2617 return err; 2618 2618 } 2619 2619 2620 - static int __exit sbmac_remove(struct platform_device *pldev) 2620 + static int sbmac_remove(struct platform_device *pldev) 2621 2621 { 2622 2622 struct net_device *dev = platform_get_drvdata(pldev); 2623 2623 struct sbmac_softc *sc = netdev_priv(dev); ··· 2634 2634 2635 2635 static struct platform_driver sbmac_driver = { 2636 2636 .probe = sbmac_probe, 2637 - .remove = __exit_p(sbmac_remove), 2637 + .remove = sbmac_remove, 2638 2638 .driver = { 2639 2639 .name = sbmac_string, 2640 2640 },
+2 -2
drivers/net/ethernet/faraday/ftgmac100.c
··· 1456 1456 return err; 1457 1457 } 1458 1458 1459 - static int __exit ftgmac100_remove(struct platform_device *pdev) 1459 + static int ftgmac100_remove(struct platform_device *pdev) 1460 1460 { 1461 1461 struct net_device *netdev; 1462 1462 struct ftgmac100 *priv; ··· 1483 1483 1484 1484 static struct platform_driver ftgmac100_driver = { 1485 1485 .probe = ftgmac100_probe, 1486 - .remove = __exit_p(ftgmac100_remove), 1486 + .remove = ftgmac100_remove, 1487 1487 .driver = { 1488 1488 .name = DRV_NAME, 1489 1489 .of_match_table = ftgmac100_of_match,
+2 -2
drivers/net/ethernet/faraday/ftmac100.c
··· 1156 1156 return err; 1157 1157 } 1158 1158 1159 - static int __exit ftmac100_remove(struct platform_device *pdev) 1159 + static int ftmac100_remove(struct platform_device *pdev) 1160 1160 { 1161 1161 struct net_device *netdev; 1162 1162 struct ftmac100 *priv; ··· 1176 1176 1177 1177 static struct platform_driver ftmac100_driver = { 1178 1178 .probe = ftmac100_probe, 1179 - .remove = __exit_p(ftmac100_remove), 1179 + .remove = ftmac100_remove, 1180 1180 .driver = { 1181 1181 .name = DRV_NAME, 1182 1182 },
+2 -2
drivers/net/ethernet/seeq/sgiseeq.c
··· 807 807 return err; 808 808 } 809 809 810 - static int __exit sgiseeq_remove(struct platform_device *pdev) 810 + static int sgiseeq_remove(struct platform_device *pdev) 811 811 { 812 812 struct net_device *dev = platform_get_drvdata(pdev); 813 813 struct sgiseeq_private *sp = netdev_priv(dev); ··· 822 822 823 823 static struct platform_driver sgiseeq_driver = { 824 824 .probe = sgiseeq_probe, 825 - .remove = __exit_p(sgiseeq_remove), 825 + .remove = sgiseeq_remove, 826 826 .driver = { 827 827 .name = "sgiseeq", 828 828 }
+2 -2
drivers/net/ethernet/sgi/meth.c
··· 854 854 return 0; 855 855 } 856 856 857 - static int __exit meth_remove(struct platform_device *pdev) 857 + static int meth_remove(struct platform_device *pdev) 858 858 { 859 859 struct net_device *dev = platform_get_drvdata(pdev); 860 860 ··· 866 866 867 867 static struct platform_driver meth_driver = { 868 868 .probe = meth_probe, 869 - .remove = __exit_p(meth_remove), 869 + .remove = meth_remove, 870 870 .driver = { 871 871 .name = "meth", 872 872 }