diff options
Diffstat (limited to 'drivers/scsi/a4000t.c')
| -rw-r--r-- | drivers/scsi/a4000t.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/scsi/a4000t.c b/drivers/scsi/a4000t.c index 66c573093901..75b43047a155 100644 --- a/drivers/scsi/a4000t.c +++ b/drivers/scsi/a4000t.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Detection routine for the NCR53c710 based Amiga SCSI Controllers for Linux. * Amiga Technologies A4000T SCSI controller. @@ -94,7 +95,7 @@ static int __init amiga_a4000t_scsi_probe(struct platform_device *pdev) return -ENODEV; } -static int __exit amiga_a4000t_scsi_remove(struct platform_device *pdev) +static void __exit amiga_a4000t_scsi_remove(struct platform_device *pdev) { struct Scsi_Host *host = platform_get_drvdata(pdev); struct NCR_700_Host_Parameters *hostdata = shost_priv(host); @@ -105,13 +106,18 @@ static int __exit amiga_a4000t_scsi_remove(struct platform_device *pdev) kfree(hostdata); free_irq(host->irq, host); release_mem_region(res->start, resource_size(res)); - return 0; } -static struct platform_driver amiga_a4000t_scsi_driver = { +/* + * amiga_a4000t_scsi_remove() lives in .exit.text. For drivers registered via + * module_platform_driver_probe() this is ok because they cannot get unbound at + * runtime. So mark the driver struct with __refdata to prevent modpost + * triggering a section mismatch warning. + */ +static struct platform_driver amiga_a4000t_scsi_driver __refdata = { .remove = __exit_p(amiga_a4000t_scsi_remove), - .driver = { - .name = "amiga-a4000t-scsi", + .driver = { + .name = "amiga-a4000t-scsi", }, }; |
