Skip to content

Commit d035e4e

Browse files
committed
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()
2 parents 391ce5b + 99bce51 commit d035e4e

File tree

3 files changed

+11
-27
lines changed

3 files changed

+11
-27
lines changed

drivers/ata/libata-core.c

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6180,24 +6180,10 @@ EXPORT_SYMBOL_GPL(ata_pci_remove_one);
61806180
void ata_pci_shutdown_one(struct pci_dev *pdev)
61816181
{
61826182
struct ata_host *host = pci_get_drvdata(pdev);
6183-
struct ata_port *ap;
6184-
unsigned long flags;
61856183
int i;
61866184

6187-
/* Tell EH to disable all devices */
6188-
for (i = 0; i < host->n_ports; i++) {
6189-
ap = host->ports[i];
6190-
spin_lock_irqsave(ap->lock, flags);
6191-
ap->pflags |= ATA_PFLAG_UNLOADING;
6192-
ata_port_schedule_eh(ap);
6193-
spin_unlock_irqrestore(ap->lock, flags);
6194-
}
6195-
61966185
for (i = 0; i < host->n_ports; i++) {
6197-
ap = host->ports[i];
6198-
6199-
/* Wait for EH to complete before freezing the port */
6200-
ata_port_wait_eh(ap);
6186+
struct ata_port *ap = host->ports[i];
62016187

62026188
ap->pflags |= ATA_PFLAG_FROZEN;
62036189

drivers/ata/pata_falcon.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ static struct ata_port_operations pata_falcon_ops = {
121121
.set_mode = pata_falcon_set_mode,
122122
};
123123

124-
static int __init pata_falcon_init_one(struct platform_device *pdev)
124+
static int pata_falcon_init_one(struct platform_device *pdev)
125125
{
126126
struct resource *base_mem_res, *ctl_mem_res;
127127
struct resource *base_res, *ctl_res, *irq_res;
@@ -216,23 +216,22 @@ static int __init pata_falcon_init_one(struct platform_device *pdev)
216216
IRQF_SHARED, &pata_falcon_sht);
217217
}
218218

219-
static int __exit pata_falcon_remove_one(struct platform_device *pdev)
219+
static void pata_falcon_remove_one(struct platform_device *pdev)
220220
{
221221
struct ata_host *host = platform_get_drvdata(pdev);
222222

223223
ata_host_detach(host);
224-
225-
return 0;
226224
}
227225

228226
static struct platform_driver pata_falcon_driver = {
229-
.remove = __exit_p(pata_falcon_remove_one),
227+
.probe = pata_falcon_init_one,
228+
.remove_new = pata_falcon_remove_one,
230229
.driver = {
231230
.name = "atari-falcon-ide",
232231
},
233232
};
234233

235-
module_platform_driver_probe(pata_falcon_driver, pata_falcon_init_one);
234+
module_platform_driver(pata_falcon_driver);
236235

237236
MODULE_AUTHOR("Bartlomiej Zolnierkiewicz");
238237
MODULE_DESCRIPTION("low-level driver for Atari Falcon PATA");

drivers/ata/pata_gayle.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ static struct ata_port_operations pata_gayle_a4000_ops = {
124124
.set_mode = pata_gayle_set_mode,
125125
};
126126

127-
static int __init pata_gayle_init_one(struct platform_device *pdev)
127+
static int pata_gayle_init_one(struct platform_device *pdev)
128128
{
129129
struct resource *res;
130130
struct gayle_ide_platform_data *pdata;
@@ -193,23 +193,22 @@ static int __init pata_gayle_init_one(struct platform_device *pdev)
193193
return 0;
194194
}
195195

196-
static int __exit pata_gayle_remove_one(struct platform_device *pdev)
196+
static void pata_gayle_remove_one(struct platform_device *pdev)
197197
{
198198
struct ata_host *host = platform_get_drvdata(pdev);
199199

200200
ata_host_detach(host);
201-
202-
return 0;
203201
}
204202

205203
static struct platform_driver pata_gayle_driver = {
206-
.remove = __exit_p(pata_gayle_remove_one),
204+
.probe = pata_gayle_init_one,
205+
.remove_new = pata_gayle_remove_one,
207206
.driver = {
208207
.name = "amiga-gayle-ide",
209208
},
210209
};
211210

212-
module_platform_driver_probe(pata_gayle_driver, pata_gayle_init_one);
211+
module_platform_driver(pata_gayle_driver);
213212

214213
MODULE_AUTHOR("Bartlomiej Zolnierkiewicz");
215214
MODULE_DESCRIPTION("low-level driver for Amiga Gayle PATA");

0 commit comments

Comments
 (0)