From 402ba7d3a7965c03935bececd51005f9df9cd7a8 Mon Sep 17 00:00:00 2001 From: Jeff Garzik <jgarzik@redhat.com> Date: Wed, 22 Oct 2003 04:30:54 -0400 Subject: [PATCH] [libata] add ->host_stop hook, and copy ->private_data from probe_ent --- drivers/scsi/libata-core.c | 3 +++ include/linux/libata.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index e3dfc95025ff..4ac1a85690ce 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -2849,6 +2849,7 @@ int ata_device_add(struct ata_probe_ent *ent) host_set->n_ports = ent->n_ports; host_set->irq = ent->irq; host_set->mmio_base = ent->mmio_base; + host_set->private_data = ent->private_data; /* register each port bound to this device */ for (i = 0; i < ent->n_ports; i++) { @@ -3191,6 +3192,8 @@ void ata_pci_remove_one (struct pci_dev *pdev) free_irq(host_set->irq, host_set); if (host_set->mmio_base) iounmap(host_set->mmio_base); + if (host_set->ports[0]->ops->host_stop) + host_set->ports[0]->ops->host_stop(host_set); for (i = 0; i < host_set->n_ports; i++) { Scsi_Host_Template *sht; diff --git a/include/linux/libata.h b/include/linux/libata.h index ccc998635ac9..e34b31950dd6 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -207,6 +207,7 @@ struct ata_probe_ent { unsigned int irq_flags; unsigned long host_flags; void *mmio_base; + void *private_data; }; struct ata_host_set { @@ -371,6 +372,8 @@ struct ata_port_operations { int (*port_start) (struct ata_port *ap); void (*port_stop) (struct ata_port *ap); + + void (*host_stop) (struct ata_host_set *host_set); }; struct ata_port_info { -- 2.30.9