ata fixes for 6.7-rc1

- Revert a change in ata_pci_shutdown_one() to suspend disks on
    shutdown as this is now done using the manage_shutdown scsi device
    flag (from me).
 
  - Change the pata_falcon and pata_gayle drivers to stop using
    module_platform_driver_probe(). This makes these drivers more inline
    with all other drivers (allowing bind/unbind) and suppress a
    compilation warning (from Uwe).
 
  - Convert the pata_falcon and pata_gayle drivers to the new
    .remove_new() void-return callback. These 2 drivers are the last ones
    needing this change (from Uwe).
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQSRPv8tYSvhwAzJdzjdoc3SxdoYdgUCZU1mOAAKCRDdoc3SxdoY
 doI2AQClFXqNKQENya8Hx8MlJ5T9tNv9vVM9iriwcKIPv8ApNgEA0giBSc99SX/T
 qHzZBkUmA5A+SXs8Lg1yHD0PvlmnkQs=
 =Cgwe
 -----END PGP SIGNATURE-----

Merge tag 'ata-6.7-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata

Pull ata fixes from Damien Le Moal:

 - Revert a change in ata_pci_shutdown_one() to suspend disks on
   shutdown as this is now done using the manage_shutdown scsi device
   flag (me)

 - Change the pata_falcon and pata_gayle drivers to stop using
   module_platform_driver_probe(). This makes these drivers more inline
   with all other drivers (allowing bind/unbind) and suppress a
   compilation warning (Uwe)

 - Convert the pata_falcon and pata_gayle drivers to the new
   .remove_new() void-return callback. These 2 drivers are the last ones
   needing this change (Uwe)

* tag 'ata-6.7-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata:
  ata: pata_gayle: Convert to platform remove callback returning void
  ata: pata_falcon: Convert to platform remove callback returning void
  ata: pata_gayle: Stop using module_platform_driver_probe()
  ata: pata_falcon: Stop using module_platform_driver_probe()
  ata: libata-core: Fix ata_pci_shutdown_one()
This commit is contained in:
Linus Torvalds 2023-11-10 11:15:34 -08:00
commit d035e4eb38
3 changed files with 11 additions and 27 deletions

View File

@ -6180,24 +6180,10 @@ EXPORT_SYMBOL_GPL(ata_pci_remove_one);
void ata_pci_shutdown_one(struct pci_dev *pdev)
{
struct ata_host *host = pci_get_drvdata(pdev);
struct ata_port *ap;
unsigned long flags;
int i;
/* Tell EH to disable all devices */
for (i = 0; i < host->n_ports; i++) {
ap = host->ports[i];
spin_lock_irqsave(ap->lock, flags);
ap->pflags |= ATA_PFLAG_UNLOADING;
ata_port_schedule_eh(ap);
spin_unlock_irqrestore(ap->lock, flags);
}
for (i = 0; i < host->n_ports; i++) {
ap = host->ports[i];
/* Wait for EH to complete before freezing the port */
ata_port_wait_eh(ap);
struct ata_port *ap = host->ports[i];
ap->pflags |= ATA_PFLAG_FROZEN;

View File

@ -121,7 +121,7 @@ static struct ata_port_operations pata_falcon_ops = {
.set_mode = pata_falcon_set_mode,
};
static int __init pata_falcon_init_one(struct platform_device *pdev)
static int pata_falcon_init_one(struct platform_device *pdev)
{
struct resource *base_mem_res, *ctl_mem_res;
struct resource *base_res, *ctl_res, *irq_res;
@ -216,23 +216,22 @@ static int __init pata_falcon_init_one(struct platform_device *pdev)
IRQF_SHARED, &pata_falcon_sht);
}
static int __exit pata_falcon_remove_one(struct platform_device *pdev)
static void pata_falcon_remove_one(struct platform_device *pdev)
{
struct ata_host *host = platform_get_drvdata(pdev);
ata_host_detach(host);
return 0;
}
static struct platform_driver pata_falcon_driver = {
.remove = __exit_p(pata_falcon_remove_one),
.probe = pata_falcon_init_one,
.remove_new = pata_falcon_remove_one,
.driver = {
.name = "atari-falcon-ide",
},
};
module_platform_driver_probe(pata_falcon_driver, pata_falcon_init_one);
module_platform_driver(pata_falcon_driver);
MODULE_AUTHOR("Bartlomiej Zolnierkiewicz");
MODULE_DESCRIPTION("low-level driver for Atari Falcon PATA");

View File

@ -124,7 +124,7 @@ static struct ata_port_operations pata_gayle_a4000_ops = {
.set_mode = pata_gayle_set_mode,
};
static int __init pata_gayle_init_one(struct platform_device *pdev)
static int pata_gayle_init_one(struct platform_device *pdev)
{
struct resource *res;
struct gayle_ide_platform_data *pdata;
@ -193,23 +193,22 @@ static int __init pata_gayle_init_one(struct platform_device *pdev)
return 0;
}
static int __exit pata_gayle_remove_one(struct platform_device *pdev)
static void pata_gayle_remove_one(struct platform_device *pdev)
{
struct ata_host *host = platform_get_drvdata(pdev);
ata_host_detach(host);
return 0;
}
static struct platform_driver pata_gayle_driver = {
.remove = __exit_p(pata_gayle_remove_one),
.probe = pata_gayle_init_one,
.remove_new = pata_gayle_remove_one,
.driver = {
.name = "amiga-gayle-ide",
},
};
module_platform_driver_probe(pata_gayle_driver, pata_gayle_init_one);
module_platform_driver(pata_gayle_driver);
MODULE_AUTHOR("Bartlomiej Zolnierkiewicz");
MODULE_DESCRIPTION("low-level driver for Amiga Gayle PATA");