summaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata.h
diff options
context:
space:
mode:
authorMatthew Garrett <mjg@redhat.com>2012-06-25 10:13:03 +0200
committerJeff Garzik <jgarzik@redhat.com>2012-06-29 17:38:10 +0200
commit6b66d95895c149cbc04d4fac5a2f5477c543a8ae (patch)
treefbf0349878339b7104338af89be86d0f78bfee1a /drivers/ata/libata.h
parent[SCSI] add wrapper to access and set scsi_bus_type in struct acpi_bus_type (diff)
downloadlinux-6b66d95895c149cbc04d4fac5a2f5477c543a8ae.tar.xz
linux-6b66d95895c149cbc04d4fac5a2f5477c543a8ae.zip
libata: bind the Linux device tree to the ACPI device tree
Associate the ACPI device tree and libata devices. This patch uses the generic ACPI glue framework to do so. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Holger Macht <holger@homac.de> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/libata.h')
-rw-r--r--drivers/ata/libata.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h
index 9d0fd0b71852..7f48b602b01b 100644
--- a/drivers/ata/libata.h
+++ b/drivers/ata/libata.h
@@ -107,6 +107,8 @@ extern const char *sata_spd_string(unsigned int spd);
extern int ata_port_probe(struct ata_port *ap);
extern void __ata_port_probe(struct ata_port *ap);
+#define to_ata_port(d) container_of(d, struct ata_port, tdev)
+
/* libata-acpi.c */
#ifdef CONFIG_ATA_ACPI
extern unsigned int ata_acpi_gtf_filter;
@@ -119,6 +121,8 @@ extern void ata_acpi_on_resume(struct ata_port *ap);
extern int ata_acpi_on_devcfg(struct ata_device *dev);
extern void ata_acpi_on_disable(struct ata_device *dev);
extern void ata_acpi_set_state(struct ata_port *ap, pm_message_t state);
+extern int ata_acpi_register(void);
+extern void ata_acpi_unregister(void);
#else
static inline void ata_acpi_associate_sata_port(struct ata_port *ap) { }
static inline void ata_acpi_associate(struct ata_host *host) { }
@@ -129,6 +133,8 @@ static inline int ata_acpi_on_devcfg(struct ata_device *dev) { return 0; }
static inline void ata_acpi_on_disable(struct ata_device *dev) { }
static inline void ata_acpi_set_state(struct ata_port *ap,
pm_message_t state) { }
+static inline int ata_acpi_register(void) { return 0; }
+static void ata_acpi_unregister(void) { }
#endif
/* libata-scsi.c */