diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2007-04-26 03:19:26 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-04-28 15:16:40 -0400 |
commit | 4b22afd743a3882123a16135fa863558c0ac2d94 (patch) | |
tree | 1d6c244f112c9faeb19021c87d46c00df7f1ae84 /drivers/ata | |
parent | a473446856374668c4296db5256ca708ce8f7095 (diff) |
drivers/ata/pata_cmd640.c: fix build with CONFIG_PM=n
This is grubby, but all the ata drivers do it this way.
Would it not be better to do
#define ata_scsi_device_resume NULL
in libata.h, remove all those ifdefs?
(updated version, ug, ug)
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/pata_cmd640.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/ata/pata_cmd640.c b/drivers/ata/pata_cmd640.c index ab9468d16edb..2105985a8013 100644 --- a/drivers/ata/pata_cmd640.c +++ b/drivers/ata/pata_cmd640.c | |||
@@ -181,8 +181,10 @@ static struct scsi_host_template cmd640_sht = { | |||
181 | .slave_configure = ata_scsi_slave_config, | 181 | .slave_configure = ata_scsi_slave_config, |
182 | .slave_destroy = ata_scsi_slave_destroy, | 182 | .slave_destroy = ata_scsi_slave_destroy, |
183 | .bios_param = ata_std_bios_param, | 183 | .bios_param = ata_std_bios_param, |
184 | #ifdef CONFIG_PM | ||
184 | .resume = ata_scsi_device_resume, | 185 | .resume = ata_scsi_device_resume, |
185 | .suspend = ata_scsi_device_suspend, | 186 | .suspend = ata_scsi_device_suspend, |
187 | #endif | ||
186 | }; | 188 | }; |
187 | 189 | ||
188 | static struct ata_port_operations cmd640_port_ops = { | 190 | static struct ata_port_operations cmd640_port_ops = { |
@@ -267,7 +269,11 @@ static int cmd640_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
267 | static int cmd640_reinit_one(struct pci_dev *pdev) | 269 | static int cmd640_reinit_one(struct pci_dev *pdev) |
268 | { | 270 | { |
269 | cmd640_hardware_init(pdev); | 271 | cmd640_hardware_init(pdev); |
272 | #ifdef CONFIG_PM | ||
270 | return ata_pci_device_resume(pdev); | 273 | return ata_pci_device_resume(pdev); |
274 | #else | ||
275 | return 0; | ||
276 | #endif | ||
271 | } | 277 | } |
272 | 278 | ||
273 | static const struct pci_device_id cmd640[] = { | 279 | static const struct pci_device_id cmd640[] = { |
@@ -280,7 +286,9 @@ static struct pci_driver cmd640_pci_driver = { | |||
280 | .id_table = cmd640, | 286 | .id_table = cmd640, |
281 | .probe = cmd640_init_one, | 287 | .probe = cmd640_init_one, |
282 | .remove = ata_pci_remove_one, | 288 | .remove = ata_pci_remove_one, |
289 | #ifdef CONFIG_PM | ||
283 | .suspend = ata_pci_device_suspend, | 290 | .suspend = ata_pci_device_suspend, |
291 | #endif | ||
284 | .resume = cmd640_reinit_one, | 292 | .resume = cmd640_reinit_one, |
285 | }; | 293 | }; |
286 | 294 | ||