aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-eh.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-03-02 03:32:47 -0500
committerJeff Garzik <jeff@garzik.org>2007-03-02 18:30:35 -0500
commit6ffa01d88c9dd45e2ed917b5eeeb494d07efb1ab (patch)
tree3fe262ccaa1c0f8c5e5d187216d8bfc70db34d95 /drivers/ata/libata-eh.c
parent438ac6d5e3f8106a6bd1a5682c508d660294a85d (diff)
libata: add CONFIG_PM to libata core layer
Conditionalize all PM related stuff in libata core layer using CONFIG_PM. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r--drivers/ata/libata-eh.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index cad0d6db6df5..7349c3dbf774 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -52,8 +52,33 @@ enum {
52 52
53static void __ata_port_freeze(struct ata_port *ap); 53static void __ata_port_freeze(struct ata_port *ap);
54static void ata_eh_finish(struct ata_port *ap); 54static void ata_eh_finish(struct ata_port *ap);
55#ifdef CONFIG_PM
55static void ata_eh_handle_port_suspend(struct ata_port *ap); 56static void ata_eh_handle_port_suspend(struct ata_port *ap);
56static void ata_eh_handle_port_resume(struct ata_port *ap); 57static void ata_eh_handle_port_resume(struct ata_port *ap);
58static int ata_eh_suspend(struct ata_port *ap,
59 struct ata_device **r_failed_dev);
60static void ata_eh_prep_resume(struct ata_port *ap);
61static int ata_eh_resume(struct ata_port *ap, struct ata_device **r_failed_dev);
62#else /* CONFIG_PM */
63static void ata_eh_handle_port_suspend(struct ata_port *ap)
64{ }
65
66static void ata_eh_handle_port_resume(struct ata_port *ap)
67{ }
68
69static int ata_eh_suspend(struct ata_port *ap, struct ata_device **r_failed_dev)
70{
71 return 0;
72}
73
74static void ata_eh_prep_resume(struct ata_port *ap)
75{ }
76
77static int ata_eh_resume(struct ata_port *ap, struct ata_device **r_failed_dev)
78{
79 return 0;
80}
81#endif /* CONFIG_PM */
57 82
58static void ata_ering_record(struct ata_ering *ering, int is_io, 83static void ata_ering_record(struct ata_ering *ering, int is_io,
59 unsigned int err_mask) 84 unsigned int err_mask)
@@ -1790,6 +1815,7 @@ static int ata_eh_revalidate_and_attach(struct ata_port *ap,
1790 return rc; 1815 return rc;
1791} 1816}
1792 1817
1818#ifdef CONFIG_PM
1793/** 1819/**
1794 * ata_eh_suspend - handle suspend EH action 1820 * ata_eh_suspend - handle suspend EH action
1795 * @ap: target host port 1821 * @ap: target host port
@@ -1947,6 +1973,7 @@ static int ata_eh_resume(struct ata_port *ap, struct ata_device **r_failed_dev)
1947 DPRINTK("EXIT\n"); 1973 DPRINTK("EXIT\n");
1948 return 0; 1974 return 0;
1949} 1975}
1976#endif /* CONFIG_PM */
1950 1977
1951static int ata_port_nr_enabled(struct ata_port *ap) 1978static int ata_port_nr_enabled(struct ata_port *ap)
1952{ 1979{
@@ -2249,6 +2276,7 @@ void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset,
2249 ata_eh_finish(ap); 2276 ata_eh_finish(ap);
2250} 2277}
2251 2278
2279#ifdef CONFIG_PM
2252/** 2280/**
2253 * ata_eh_handle_port_suspend - perform port suspend operation 2281 * ata_eh_handle_port_suspend - perform port suspend operation
2254 * @ap: port to suspend 2282 * @ap: port to suspend
@@ -2364,3 +2392,4 @@ static void ata_eh_handle_port_resume(struct ata_port *ap)
2364 } 2392 }
2365 spin_unlock_irqrestore(ap->lock, flags); 2393 spin_unlock_irqrestore(ap->lock, flags);
2366} 2394}
2395#endif /* CONFIG_PM */