[PATCH] eata: Implement shutdown callback for eata driver
From: Jiang Liu
Date: Sat Oct 03 2015 - 03:57:39 EST
Implement shutdown callback for eata driver, so eata controllers will
be put into ready state for kexec.
Signed-off-by: Jiang Liu <jiang.liu@xxxxxxxxxxxxxxx>
---
drivers/scsi/eata.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c
index ceeba4d7b4ff..f3ef9ac97646 100644
--- a/drivers/scsi/eata.c
+++ b/drivers/scsi/eata.c
@@ -1517,6 +1517,11 @@ static void eata2x_pci_remove(struct pci_dev *pdev)
pci_disable_device(pdev);
}
+static void eata2x_pci_shutdown(struct pci_dev *pdev)
+{
+ port_remove(&pdev->dev);
+}
+
static struct pci_device_id eata2x_tbl[] = {
{ PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_SCSI << 8, PCI_ANY_ID) },
{ },
@@ -1528,6 +1533,7 @@ static struct pci_driver eata2x_pci_driver = {
.id_table = eata2x_tbl,
.probe = eata2x_pci_probe,
.remove = eata2x_pci_remove,
+ .shutdown = eata2x_pci_shutdown,
};
static int eata2x_register_pci_driver(void)
@@ -1569,8 +1575,14 @@ static int __exit eata2x_platform_remove(struct platform_device *pdev)
return 0;
}
+static void eata2x_platform_shutdown(struct platform_device *pdev)
+{
+ port_remove(&pdev->dev);
+}
+
static struct platform_driver eata2x_platform_driver = {
.remove = __exit_p(eata2x_platform_remove),
+ .shutdown = eata2x_platform_shutdown,
.driver = {
.name = "eata_plat",
.owner = THIS_MODULE,
--
1.7.10.4
--------------080201060803010608010500--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/