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

isa: Make the remove callback for isa drivers return void

The driver core ignores the return value of the remove callback, so
don't give isa drivers the chance to provide a value.

Adapt all isa_drivers with a remove callbacks accordingly; they all
return 0 unconditionally anyhow.

Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> # for drivers/net/can/sja1000/tscan1.c
Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Acked-by: Wolfram Sang <wsa@kernel.org> # for drivers/i2c/
Reviewed-by: Takashi Iway <tiwai@suse.de> # for sound/
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> # for drivers/media/
Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Link: https://lore.kernel.org/r/20210122092449.426097-4-uwe@kleine-koenig.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Uwe Kleine-König and committed by
Takashi Iwai
30e88d01 7797b4e0

+41 -83
+1 -1
drivers/base/isa.c
··· 51 51 struct isa_driver *isa_driver = dev->platform_data; 52 52 53 53 if (isa_driver && isa_driver->remove) 54 - return isa_driver->remove(dev, to_isa_dev(dev)->id); 54 + isa_driver->remove(dev, to_isa_dev(dev)->id); 55 55 56 56 return 0; 57 57 }
+1 -3
drivers/i2c/busses/i2c-elektor.c
··· 282 282 return -ENODEV; 283 283 } 284 284 285 - static int elektor_remove(struct device *dev, unsigned int id) 285 + static void elektor_remove(struct device *dev, unsigned int id) 286 286 { 287 287 i2c_del_adapter(&pcf_isa_ops); 288 288 ··· 298 298 iounmap(base_iomem); 299 299 release_mem_region(base, 2); 300 300 } 301 - 302 - return 0; 303 301 } 304 302 305 303 static struct isa_driver i2c_elektor_driver = {
+1 -3
drivers/i2c/busses/i2c-pca-isa.c
··· 161 161 return -ENODEV; 162 162 } 163 163 164 - static int pca_isa_remove(struct device *dev, unsigned int id) 164 + static void pca_isa_remove(struct device *dev, unsigned int id) 165 165 { 166 166 i2c_del_adapter(&pca_isa_ops); 167 167 ··· 170 170 free_irq(irq, &pca_isa_ops); 171 171 } 172 172 release_region(base, IO_SIZE); 173 - 174 - return 0; 175 173 } 176 174 177 175 static struct isa_driver pca_isa_driver = {
+1 -3
drivers/input/touchscreen/htcpen.c
··· 171 171 return err; 172 172 } 173 173 174 - static int htcpen_isa_remove(struct device *dev, unsigned int id) 174 + static void htcpen_isa_remove(struct device *dev, unsigned int id) 175 175 { 176 176 struct input_dev *htcpen_dev = dev_get_drvdata(dev); 177 177 ··· 182 182 release_region(HTCPEN_PORT_INDEX, 2); 183 183 release_region(HTCPEN_PORT_INIT, 1); 184 184 release_region(HTCPEN_PORT_IRQ_CLEAR, 1); 185 - 186 - return 0; 187 185 } 188 186 189 187 #ifdef CONFIG_PM
+1 -3
drivers/media/radio/radio-isa.c
··· 337 337 } 338 338 EXPORT_SYMBOL_GPL(radio_isa_probe); 339 339 340 - int radio_isa_remove(struct device *pdev, unsigned int dev) 340 + void radio_isa_remove(struct device *pdev, unsigned int dev) 341 341 { 342 342 struct radio_isa_card *isa = dev_get_drvdata(pdev); 343 343 344 344 radio_isa_common_remove(isa, isa->drv->region_size); 345 - 346 - return 0; 347 345 } 348 346 EXPORT_SYMBOL_GPL(radio_isa_remove); 349 347
+1 -1
drivers/media/radio/radio-isa.h
··· 91 91 92 92 int radio_isa_match(struct device *pdev, unsigned int dev); 93 93 int radio_isa_probe(struct device *pdev, unsigned int dev); 94 - int radio_isa_remove(struct device *pdev, unsigned int dev); 94 + void radio_isa_remove(struct device *pdev, unsigned int dev); 95 95 #ifdef CONFIG_PNP 96 96 int radio_isa_pnp_probe(struct pnp_dev *dev, 97 97 const struct pnp_device_id *dev_id);
+1 -3
drivers/media/radio/radio-sf16fmr2.c
··· 293 293 kfree(fmr2); 294 294 } 295 295 296 - static int fmr2_isa_remove(struct device *pdev, unsigned int ndev) 296 + static void fmr2_isa_remove(struct device *pdev, unsigned int ndev) 297 297 { 298 298 fmr2_remove(dev_get_drvdata(pdev)); 299 - 300 - return 0; 301 299 } 302 300 303 301 static void fmr2_pnp_remove(struct pnp_dev *pdev)
+1 -3
drivers/net/can/sja1000/tscan1.c
··· 159 159 return -ENXIO; 160 160 } 161 161 162 - static int tscan1_remove(struct device *dev, unsigned id /*unused*/) 162 + static void tscan1_remove(struct device *dev, unsigned id /*unused*/) 163 163 { 164 164 struct net_device *netdev; 165 165 struct sja1000_priv *priv; ··· 179 179 release_region(pld_base, TSCAN1_PLD_SIZE); 180 180 181 181 free_sja1000dev(netdev); 182 - 183 - return 0; 184 182 } 185 183 186 184 static struct isa_driver tscan1_isa_driver = {
+1 -2
drivers/net/ethernet/3com/3c509.c
··· 335 335 return 1; 336 336 } 337 337 338 - static int el3_isa_remove(struct device *pdev, 338 + static void el3_isa_remove(struct device *pdev, 339 339 unsigned int ndev) 340 340 { 341 341 el3_device_remove(pdev); 342 342 dev_set_drvdata(pdev, NULL); 343 - return 0; 344 343 } 345 344 346 345 #ifdef CONFIG_PM
+1 -2
drivers/scsi/advansys.c
··· 11459 11459 return err; 11460 11460 } 11461 11461 11462 - static int advansys_isa_remove(struct device *dev, unsigned int id) 11462 + static void advansys_isa_remove(struct device *dev, unsigned int id) 11463 11463 { 11464 11464 int ioport = _asc_def_iop_base[id]; 11465 11465 advansys_release(dev_get_drvdata(dev)); 11466 11466 release_region(ioport, ASC_IOADR_GAP); 11467 - return 0; 11468 11467 } 11469 11468 11470 11469 static struct isa_driver advansys_isa_driver = {
+1 -2
drivers/scsi/aha1542.c
··· 1025 1025 return 1; 1026 1026 } 1027 1027 1028 - static int aha1542_isa_remove(struct device *pdev, 1028 + static void aha1542_isa_remove(struct device *pdev, 1029 1029 unsigned int ndev) 1030 1030 { 1031 1031 aha1542_release(dev_get_drvdata(pdev)); 1032 1032 dev_set_drvdata(pdev, NULL); 1033 - return 0; 1034 1033 } 1035 1034 1036 1035 static struct isa_driver aha1542_isa_driver = {
+1 -2
drivers/scsi/fdomain_isa.c
··· 175 175 return 1; 176 176 } 177 177 178 - static int fdomain_isa_remove(struct device *dev, unsigned int ndev) 178 + static void fdomain_isa_remove(struct device *dev, unsigned int ndev) 179 179 { 180 180 struct Scsi_Host *sh = dev_get_drvdata(dev); 181 181 int base = sh->io_port; ··· 183 183 fdomain_destroy(sh); 184 184 release_region(base, FDOMAIN_REGION_SIZE); 185 185 dev_set_drvdata(dev, NULL); 186 - return 0; 187 186 } 188 187 189 188 static struct isa_driver fdomain_isa_driver = {
+2 -3
drivers/scsi/g_NCR5380.c
··· 720 720 return 1; 721 721 } 722 722 723 - static int generic_NCR5380_isa_remove(struct device *pdev, 724 - unsigned int ndev) 723 + static void generic_NCR5380_isa_remove(struct device *pdev, 724 + unsigned int ndev) 725 725 { 726 726 generic_NCR5380_release_resources(dev_get_drvdata(pdev)); 727 727 dev_set_drvdata(pdev, NULL); 728 - return 0; 729 728 } 730 729 731 730 static struct isa_driver generic_NCR5380_isa_driver = {
+1 -3
drivers/watchdog/pcwd.c
··· 951 951 return ret; 952 952 } 953 953 954 - static int pcwd_isa_remove(struct device *dev, unsigned int id) 954 + static void pcwd_isa_remove(struct device *dev, unsigned int id) 955 955 { 956 956 if (debug >= DEBUG) 957 957 pr_debug("pcwd_isa_remove id=%d\n", id); ··· 968 968 (pcwd_private.revision == PCWD_REVISION_A) ? 2 : 4); 969 969 pcwd_private.io_addr = 0x0000; 970 970 cards_found--; 971 - 972 - return 0; 973 971 } 974 972 975 973 static void pcwd_isa_shutdown(struct device *dev, unsigned int id)
+1 -1
include/linux/isa.h
··· 13 13 struct isa_driver { 14 14 int (*match)(struct device *, unsigned int); 15 15 int (*probe)(struct device *, unsigned int); 16 - int (*remove)(struct device *, unsigned int); 16 + void (*remove)(struct device *, unsigned int); 17 17 void (*shutdown)(struct device *, unsigned int); 18 18 int (*suspend)(struct device *, unsigned int, pm_message_t); 19 19 int (*resume)(struct device *, unsigned int);
+1 -2
sound/isa/ad1848/ad1848.c
··· 118 118 return error; 119 119 } 120 120 121 - static int snd_ad1848_remove(struct device *dev, unsigned int n) 121 + static void snd_ad1848_remove(struct device *dev, unsigned int n) 122 122 { 123 123 snd_card_free(dev_get_drvdata(dev)); 124 - return 0; 125 124 } 126 125 127 126 #ifdef CONFIG_PM
+1 -2
sound/isa/adlib.c
··· 97 97 return error; 98 98 } 99 99 100 - static int snd_adlib_remove(struct device *dev, unsigned int n) 100 + static void snd_adlib_remove(struct device *dev, unsigned int n) 101 101 { 102 102 snd_card_free(dev_get_drvdata(dev)); 103 - return 0; 104 103 } 105 104 106 105 static struct isa_driver snd_adlib_driver = {
+1 -2
sound/isa/cmi8328.c
··· 403 403 return err; 404 404 } 405 405 406 - static int snd_cmi8328_remove(struct device *pdev, unsigned int dev) 406 + static void snd_cmi8328_remove(struct device *pdev, unsigned int dev) 407 407 { 408 408 struct snd_card *card = dev_get_drvdata(pdev); 409 409 struct snd_cmi8328 *cmi = card->private_data; ··· 420 420 snd_cmi8328_cfg_write(cmi->port, CFG2, 0); 421 421 snd_cmi8328_cfg_write(cmi->port, CFG3, 0); 422 422 snd_card_free(card); 423 - return 0; 424 423 } 425 424 426 425 #ifdef CONFIG_PM
+1 -2
sound/isa/cmi8330.c
··· 631 631 return 0; 632 632 } 633 633 634 - static int snd_cmi8330_isa_remove(struct device *devptr, 634 + static void snd_cmi8330_isa_remove(struct device *devptr, 635 635 unsigned int dev) 636 636 { 637 637 snd_card_free(dev_get_drvdata(devptr)); 638 - return 0; 639 638 } 640 639 641 640 #ifdef CONFIG_PM
+1 -2
sound/isa/cs423x/cs4231.c
··· 135 135 return error; 136 136 } 137 137 138 - static int snd_cs4231_remove(struct device *dev, unsigned int n) 138 + static void snd_cs4231_remove(struct device *dev, unsigned int n) 139 139 { 140 140 snd_card_free(dev_get_drvdata(dev)); 141 - return 0; 142 141 } 143 142 144 143 #ifdef CONFIG_PM
+1 -2
sound/isa/cs423x/cs4236.c
··· 487 487 return 0; 488 488 } 489 489 490 - static int snd_cs423x_isa_remove(struct device *pdev, 490 + static void snd_cs423x_isa_remove(struct device *pdev, 491 491 unsigned int dev) 492 492 { 493 493 snd_card_free(dev_get_drvdata(pdev)); 494 - return 0; 495 494 } 496 495 497 496 #ifdef CONFIG_PM
+1 -2
sound/isa/es1688/es1688.c
··· 192 192 return error; 193 193 } 194 194 195 - static int snd_es1688_isa_remove(struct device *dev, unsigned int n) 195 + static void snd_es1688_isa_remove(struct device *dev, unsigned int n) 196 196 { 197 197 snd_card_free(dev_get_drvdata(dev)); 198 - return 0; 199 198 } 200 199 201 200 static struct isa_driver snd_es1688_driver = {
+2 -3
sound/isa/es18xx.c
··· 2210 2210 } 2211 2211 } 2212 2212 2213 - static int snd_es18xx_isa_remove(struct device *devptr, 2214 - unsigned int dev) 2213 + static void snd_es18xx_isa_remove(struct device *devptr, 2214 + unsigned int dev) 2215 2215 { 2216 2216 snd_card_free(dev_get_drvdata(devptr)); 2217 - return 0; 2218 2217 } 2219 2218 2220 2219 #ifdef CONFIG_PM
+1 -2
sound/isa/galaxy/galaxy.c
··· 608 608 return err; 609 609 } 610 610 611 - static int snd_galaxy_remove(struct device *dev, unsigned int n) 611 + static void snd_galaxy_remove(struct device *dev, unsigned int n) 612 612 { 613 613 snd_card_free(dev_get_drvdata(dev)); 614 - return 0; 615 614 } 616 615 617 616 static struct isa_driver snd_galaxy_driver = {
+1 -2
sound/isa/gus/gusclassic.c
··· 195 195 return error; 196 196 } 197 197 198 - static int snd_gusclassic_remove(struct device *dev, unsigned int n) 198 + static void snd_gusclassic_remove(struct device *dev, unsigned int n) 199 199 { 200 200 snd_card_free(dev_get_drvdata(dev)); 201 - return 0; 202 201 } 203 202 204 203 static struct isa_driver snd_gusclassic_driver = {
+1 -2
sound/isa/gus/gusextreme.c
··· 324 324 return error; 325 325 } 326 326 327 - static int snd_gusextreme_remove(struct device *dev, unsigned int n) 327 + static void snd_gusextreme_remove(struct device *dev, unsigned int n) 328 328 { 329 329 snd_card_free(dev_get_drvdata(dev)); 330 - return 0; 331 330 } 332 331 333 332 static struct isa_driver snd_gusextreme_driver = {
+1 -2
sound/isa/gus/gusmax.c
··· 338 338 return err; 339 339 } 340 340 341 - static int snd_gusmax_remove(struct device *devptr, unsigned int dev) 341 + static void snd_gusmax_remove(struct device *devptr, unsigned int dev) 342 342 { 343 343 snd_card_free(dev_get_drvdata(devptr)); 344 - return 0; 345 344 } 346 345 347 346 #define DEV_NAME "gusmax"
+1 -2
sound/isa/gus/interwave.c
··· 825 825 } 826 826 } 827 827 828 - static int snd_interwave_isa_remove(struct device *devptr, unsigned int dev) 828 + static void snd_interwave_isa_remove(struct device *devptr, unsigned int dev) 829 829 { 830 830 snd_card_free(dev_get_drvdata(devptr)); 831 - return 0; 832 831 } 833 832 834 833 static struct isa_driver snd_interwave_driver = {
+1 -2
sound/isa/msnd/msnd_pinnacle.c
··· 1049 1049 #endif 1050 1050 } 1051 1051 1052 - static int snd_msnd_isa_remove(struct device *pdev, unsigned int dev) 1052 + static void snd_msnd_isa_remove(struct device *pdev, unsigned int dev) 1053 1053 { 1054 1054 snd_msnd_unload(dev_get_drvdata(pdev)); 1055 - return 0; 1056 1055 } 1057 1056 1058 1057 static struct isa_driver snd_msnd_driver = {
+1 -2
sound/isa/opl3sa2.c
··· 878 878 return 0; 879 879 } 880 880 881 - static int snd_opl3sa2_isa_remove(struct device *devptr, 881 + static void snd_opl3sa2_isa_remove(struct device *devptr, 882 882 unsigned int dev) 883 883 { 884 884 snd_card_free(dev_get_drvdata(devptr)); 885 - return 0; 886 885 } 887 886 888 887 #ifdef CONFIG_PM
+1 -2
sound/isa/opti9xx/miro.c
··· 1480 1480 return 0; 1481 1481 } 1482 1482 1483 - static int snd_miro_isa_remove(struct device *devptr, 1483 + static void snd_miro_isa_remove(struct device *devptr, 1484 1484 unsigned int dev) 1485 1485 { 1486 1486 snd_card_free(dev_get_drvdata(devptr)); 1487 - return 0; 1488 1487 } 1489 1488 1490 1489 #define DEV_NAME "miro"
+2 -3
sound/isa/opti9xx/opti92x-ad1848.c
··· 1024 1024 return 0; 1025 1025 } 1026 1026 1027 - static int snd_opti9xx_isa_remove(struct device *devptr, 1028 - unsigned int dev) 1027 + static void snd_opti9xx_isa_remove(struct device *devptr, 1028 + unsigned int dev) 1029 1029 { 1030 1030 snd_card_free(dev_get_drvdata(devptr)); 1031 - return 0; 1032 1031 } 1033 1032 1034 1033 #ifdef CONFIG_PM
+1 -2
sound/isa/sb/jazz16.c
··· 339 339 return err; 340 340 } 341 341 342 - static int snd_jazz16_remove(struct device *devptr, unsigned int dev) 342 + static void snd_jazz16_remove(struct device *devptr, unsigned int dev) 343 343 { 344 344 struct snd_card *card = dev_get_drvdata(devptr); 345 345 346 346 snd_card_free(card); 347 - return 0; 348 347 } 349 348 350 349 #ifdef CONFIG_PM
+1 -2
sound/isa/sb/sb16.c
··· 547 547 } 548 548 } 549 549 550 - static int snd_sb16_isa_remove(struct device *pdev, unsigned int dev) 550 + static void snd_sb16_isa_remove(struct device *pdev, unsigned int dev) 551 551 { 552 552 snd_card_free(dev_get_drvdata(pdev)); 553 - return 0; 554 553 } 555 554 556 555 #ifdef CONFIG_PM
+1 -2
sound/isa/sb/sb8.c
··· 192 192 return err; 193 193 } 194 194 195 - static int snd_sb8_remove(struct device *pdev, unsigned int dev) 195 + static void snd_sb8_remove(struct device *pdev, unsigned int dev) 196 196 { 197 197 snd_card_free(dev_get_drvdata(pdev)); 198 - return 0; 199 198 } 200 199 201 200 #ifdef CONFIG_PM
+1 -2
sound/isa/sc6000.c
··· 672 672 return err; 673 673 } 674 674 675 - static int snd_sc6000_remove(struct device *devptr, unsigned int dev) 675 + static void snd_sc6000_remove(struct device *devptr, unsigned int dev) 676 676 { 677 677 struct snd_card *card = dev_get_drvdata(devptr); 678 678 char __iomem **vport = card->private_data; ··· 684 684 release_region(mss_port[dev], 4); 685 685 686 686 snd_card_free(card); 687 - return 0; 688 687 } 689 688 690 689 static struct isa_driver snd_sc6000_driver = {
+1 -2
sound/isa/sscape.c
··· 1183 1183 return ret; 1184 1184 } 1185 1185 1186 - static int snd_sscape_remove(struct device *devptr, unsigned int dev) 1186 + static void snd_sscape_remove(struct device *devptr, unsigned int dev) 1187 1187 { 1188 1188 snd_card_free(dev_get_drvdata(devptr)); 1189 - return 0; 1190 1189 } 1191 1190 1192 1191 #define DEV_NAME "sscape"
+1 -2
sound/isa/wavefront/wavefront.c
··· 565 565 return 0; 566 566 } 567 567 568 - static int snd_wavefront_isa_remove(struct device *devptr, 568 + static void snd_wavefront_isa_remove(struct device *devptr, 569 569 unsigned int dev) 570 570 { 571 571 snd_card_free(dev_get_drvdata(devptr)); 572 - return 0; 573 572 } 574 573 575 574 #define DEV_NAME "wavefront"