* PCI_D0 and PCI_D3hot in atiixp_modem.c not defined in pci.h
@ 2005-04-12 23:53 "Tien, C.L. - 田承禮"
2005-04-13 13:04 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: "Tien, C.L. - 田承禮" @ 2005-04-12 23:53 UTC (permalink / raw)
To: alsa-devel
Hi,
The CVS version of atiixp_modem.c use PCI_D0 and PCI_D3hot. These constants are not defined in pci.h before kernel version 2.6.11, compile the file will cause compile error as following:
CC [M] /home/cltien/work/alsa-cvs/alsa-driver/pci/atiixp_modem.o
In file included from /home/cltien/work/alsa-cvs/alsa-driver/pci/atiixp_modem.c:1:
/home/cltien/work/alsa-cvs/alsa-driver/pci/../alsa-kernel/pci/atiixp_modem.c: In function `snd_atiixp_suspend':
/home/cltien/work/alsa-cvs/alsa-driver/pci/../alsa-kernel/pci/atiixp_modem.c:1124: error: `PCI_D3hot' undeclared (first use in this function)
/home/cltien/work/alsa-cvs/alsa-driver/pci/../alsa-kernel/pci/atiixp_modem.c:1124: error: (Each undeclared identifier is reported only once
/home/cltien/work/alsa-cvs/alsa-driver/pci/../alsa-kernel/pci/atiixp_modem.c:1124: error: for each function it appears in.)
/home/cltien/work/alsa-cvs/alsa-driver/pci/../alsa-kernel/pci/atiixp_modem.c: In function `snd_atiixp_resume':
/home/cltien/work/alsa-cvs/alsa-driver/pci/../alsa-kernel/pci/atiixp_modem.c:1135: error: `PCI_D0' undeclared (first use in this function)
make[4]: *** [/home/cltien/work/alsa-cvs/alsa-driver/pci/atiixp_modem.o] Error 1make[3]: *** [/home/cltien/work/alsa-cvs/alsa-driver/pci] Error 2
make[2]: *** [_module_/home/cltien/work/alsa-cvs/alsa-driver] Error 2
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/lib/modules/2.6.9-1.667/build'
make: *** [compile] Error 2
Sincerely,
ChenLi Tien
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PCI_D0 and PCI_D3hot in atiixp_modem.c not defined in pci.h
2005-04-12 23:53 PCI_D0 and PCI_D3hot in atiixp_modem.c not defined in pci.h "Tien, C.L. - 田承禮"
@ 2005-04-13 13:04 ` Takashi Iwai
2005-04-13 13:08 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2005-04-13 13:04 UTC (permalink / raw)
To: Tien, C.L.; +Cc: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 312 bytes --]
At Wed, 13 Apr 2005 07:53:07 +0800,
Tien, C.L. wrote:
>
> Hi,
>
> The CVS version of atiixp_modem.c use PCI_D0 and PCI_D3hot. These
> constants are not defined in pci.h before kernel version 2.6.11,
> compile the file will cause compile error as following:
The patch below should fix this problem.
Takashi
[-- Attachment #2: Type: text/plain, Size: 938 bytes --]
Index: alsa-driver/include/adriver.h
===================================================================
RCS file: /home/iwai/cvs/alsa/alsa-driver/include/adriver.h,v
retrieving revision 1.108
diff -u -r1.108 adriver.h
--- alsa-driver/include/adriver.h 11 Apr 2005 15:54:49 -0000 1.108
+++ alsa-driver/include/adriver.h 13 Apr 2005 13:03:37 -0000
@@ -80,14 +80,6 @@
#endif
#endif /* LINUX_2_2 */
-#ifndef PCI_D0
-#define PCI_D0 0
-#define PCI_D1 1
-#define PCI_D2 2
-#define PCI_D3hot 3
-#define PCI_D3cold 4
-#endif
-
#ifdef LINUX_2_4__donotuse
#include <linux/init.h>
#include <linux/pm.h>
@@ -732,6 +724,16 @@
#endif
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 11)
+#ifndef PCI_D0
+#define PCI_D0 0
+#define PCI_D1 1
+#define PCI_D2 2
+#define PCI_D3hot 3
+#define PCI_D3cold 4
+#endif
+#endif
+
/* vprintk */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 9)
#include <linux/kernel.h>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PCI_D0 and PCI_D3hot in atiixp_modem.c not defined in pci.h
2005-04-13 13:04 ` Takashi Iwai
@ 2005-04-13 13:08 ` Takashi Iwai
0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2005-04-13 13:08 UTC (permalink / raw)
To: Tien, C.L.; +Cc: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 463 bytes --]
At Wed, 13 Apr 2005 15:04:59 +0200,
I wrote:
>
> [1 <text/plain; US-ASCII (7bit)>]
> At Wed, 13 Apr 2005 07:53:07 +0800,
> Tien, C.L. wrote:
> >
> > Hi,
> >
> > The CVS version of atiixp_modem.c use PCI_D0 and PCI_D3hot. These
> > constants are not defined in pci.h before kernel version 2.6.11,
> > compile the file will cause compile error as following:
>
> The patch below should fix this problem.
This one is safer...
I'll apply this to CVS.
Takashi
[-- Attachment #2: Type: text/plain, Size: 1019 bytes --]
Index: alsa-driver/include/adriver.h
===================================================================
RCS file: /home/iwai/cvs/alsa/alsa-driver/include/adriver.h,v
retrieving revision 1.108
retrieving revision 1.110
diff -u -r1.108 -r1.110
--- alsa-driver/include/adriver.h 11 Apr 2005 15:54:49 -0000 1.108
+++ alsa-driver/include/adriver.h 13 Apr 2005 13:07:29 -0000 1.110
@@ -80,14 +80,6 @@
#endif
#endif /* LINUX_2_2 */
-#ifndef PCI_D0
-#define PCI_D0 0
-#define PCI_D1 1
-#define PCI_D2 2
-#define PCI_D3hot 3
-#define PCI_D3cold 4
-#endif
-
#ifdef LINUX_2_4__donotuse
#include <linux/init.h>
#include <linux/pm.h>
@@ -732,6 +724,19 @@
#endif
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 11)
+#ifdef CONFIG_PCI
+#include <linux/pci.h>
+#ifndef PCI_D0
+#define PCI_D0 0
+#define PCI_D1 1
+#define PCI_D2 2
+#define PCI_D3hot 3
+#define PCI_D3cold 4
+#endif
+#endif
+#endif
+
/* vprintk */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 9)
#include <linux/kernel.h>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-04-13 13:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-12 23:53 PCI_D0 and PCI_D3hot in atiixp_modem.c not defined in pci.h "Tien, C.L. - 田承禮"
2005-04-13 13:04 ` Takashi Iwai
2005-04-13 13:08 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.