Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4b22afd743a3882123a16135fa863558c0ac2d94
Commit:     4b22afd743a3882123a16135fa863558c0ac2d94
Parent:     a473446856374668c4296db5256ca708ce8f7095
Author:     Andrew Morton <[EMAIL PROTECTED]>
AuthorDate: Thu Apr 26 00:19:26 2007 -0700
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Sat Apr 28 15:16:40 2007 -0400

    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 <[EMAIL PROTECTED]>
    Cc: Alan Cox <[EMAIL PROTECTED]>
    Cc: Tejun Heo <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 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 ab9468d..2105985 100644
--- a/drivers/ata/pata_cmd640.c
+++ b/drivers/ata/pata_cmd640.c
@@ -181,8 +181,10 @@ static struct scsi_host_template cmd640_sht = {
        .slave_configure        = ata_scsi_slave_config,
        .slave_destroy          = ata_scsi_slave_destroy,
        .bios_param             = ata_std_bios_param,
+#ifdef CONFIG_PM
        .resume                 = ata_scsi_device_resume,
        .suspend                = ata_scsi_device_suspend,
+#endif
 };
 
 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)
 static int cmd640_reinit_one(struct pci_dev *pdev)
 {
        cmd640_hardware_init(pdev);
+#ifdef CONFIG_PM
        return ata_pci_device_resume(pdev);
+#else
+       return 0;
+#endif
 }
 
 static const struct pci_device_id cmd640[] = {
@@ -280,7 +286,9 @@ static struct pci_driver cmd640_pci_driver = {
        .id_table       = cmd640,
        .probe          = cmd640_init_one,
        .remove         = ata_pci_remove_one,
+#ifdef CONFIG_PM
        .suspend        = ata_pci_device_suspend,
+#endif
        .resume         = cmd640_reinit_one,
 };
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to