aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/libata-core.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 583f26d6d455..8e3f4a90c088 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -67,6 +67,7 @@
67#include <linux/cdrom.h> 67#include <linux/cdrom.h>
68#include <linux/ratelimit.h> 68#include <linux/ratelimit.h>
69#include <linux/pm_runtime.h> 69#include <linux/pm_runtime.h>
70#include <linux/platform_device.h>
70 71
71#include "libata.h" 72#include "libata.h"
72#include "libata-transport.h" 73#include "libata-transport.h"
@@ -6382,6 +6383,26 @@ int ata_pci_device_resume(struct pci_dev *pdev)
6382 6383
6383#endif /* CONFIG_PCI */ 6384#endif /* CONFIG_PCI */
6384 6385
6386/**
6387 * ata_platform_remove_one - Platform layer callback for device removal
6388 * @pdev: Platform device that was removed
6389 *
6390 * Platform layer indicates to libata via this hook that hot-unplug or
6391 * module unload event has occurred. Detach all ports. Resource
6392 * release is handled via devres.
6393 *
6394 * LOCKING:
6395 * Inherited from platform layer (may sleep).
6396 */
6397int ata_platform_remove_one(struct platform_device *pdev)
6398{
6399 struct ata_host *host = platform_get_drvdata(pdev);
6400
6401 ata_host_detach(host);
6402
6403 return 0;
6404}
6405
6385static int __init ata_parse_force_one(char **cur, 6406static int __init ata_parse_force_one(char **cur,
6386 struct ata_force_ent *force_ent, 6407 struct ata_force_ent *force_ent,
6387 const char **reason) 6408 const char **reason)
@@ -6877,6 +6898,8 @@ EXPORT_SYMBOL_GPL(ata_pci_device_resume);
6877#endif /* CONFIG_PM */ 6898#endif /* CONFIG_PM */
6878#endif /* CONFIG_PCI */ 6899#endif /* CONFIG_PCI */
6879 6900
6901EXPORT_SYMBOL_GPL(ata_platform_remove_one);
6902
6880EXPORT_SYMBOL_GPL(__ata_ehi_push_desc); 6903EXPORT_SYMBOL_GPL(__ata_ehi_push_desc);
6881EXPORT_SYMBOL_GPL(ata_ehi_push_desc); 6904EXPORT_SYMBOL_GPL(ata_ehi_push_desc);
6882EXPORT_SYMBOL_GPL(ata_ehi_clear_desc); 6905EXPORT_SYMBOL_GPL(ata_ehi_clear_desc);