Skip to content

Commit

Permalink
Merge tag 'ata-6.7-rc1-2' of git://git.kernel.org/pub/scm/linux/kerne…
Browse files Browse the repository at this point in the history
…l/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()
  • Loading branch information
torvalds committed Nov 10, 2023
2 parents 391ce5b + 99bce51 commit d035e4e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 27 deletions.
16 changes: 1 addition & 15 deletions drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
11 changes: 5 additions & 6 deletions drivers/ata/pata_falcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand Down
11 changes: 5 additions & 6 deletions drivers/ata/pata_gayle.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit d035e4e

Please sign in to comment.