* [patch 08/10] drivers/ata/pata_cmd640.c: fix build with CONFIG_PM=n
@ 2007-04-26 7:19 akpm
2007-04-28 19:17 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2007-04-26 7:19 UTC (permalink / raw)
To: jeff; +Cc: linux-ide, akpm, alan, htejun
From: Andrew Morton <akpm@linux-foundation.org>
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>
---
drivers/ata/pata_cmd640.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff -puN drivers/ata/pata_cmd640.c~drivers-ata-pata_cmd640c-fix-build-with-config_pm=n drivers/ata/pata_cmd640.c
--- a/drivers/ata/pata_cmd640.c~drivers-ata-pata_cmd640c-fix-build-with-config_pm=n
+++ a/drivers/ata/pata_cmd640.c
@@ -181,8 +181,10 @@ static struct scsi_host_template cmd640_
.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_de
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_driv
.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,
};
_
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch 08/10] drivers/ata/pata_cmd640.c: fix build with CONFIG_PM=n
2007-04-26 7:19 [patch 08/10] drivers/ata/pata_cmd640.c: fix build with CONFIG_PM=n akpm
@ 2007-04-28 19:17 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2007-04-28 19:17 UTC (permalink / raw)
To: akpm; +Cc: linux-ide, alan, htejun
akpm@linux-foundation.org wrote:
> From: Andrew Morton <akpm@linux-foundation.org>
>
> 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>
> ---
>
> drivers/ata/pata_cmd640.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
applied 8-9
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-04-28 19:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-26 7:19 [patch 08/10] drivers/ata/pata_cmd640.c: fix build with CONFIG_PM=n akpm
2007-04-28 19:17 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).