lkml.org 
[lkml]   [2004]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [patch] enums to clear suspend-state confusion
Hi!

> > +enum pci_state {
> > + D0 = 0,
> > + D1 = 1,
> > + D2 = 2,
>
> These symbols are too generic. They don't appear to currently clash with
> anything else, but they could.

Actually jffs is using macros called D1, D2 and D3. Ouch. This one
should fix it.
Pavel

--- linux-forakpm/include/linux/pci.h 2004-08-15 19:35:41.000000000 +0200
+++ linux/include/linux/pci.h 2004-08-16 08:15:59.000000000 +0200
@@ -1023,23 +1023,23 @@
#define PCIPCI_ALIMAGIK 32

enum pci_state {
- D0 = 0,
- D1 = 1,
- D2 = 2,
- D3hot = 3,
- D3cold = 4
+ PCI_D0 = 0,
+ PCI_D1 = 1,
+ PCI_D2 = 2,
+ PCI_D3hot = 3,
+ PCI_D3cold = 4
};

static inline enum pci_state to_pci_state(suspend_state_t state)
{
if (SUSPEND_EQ(state, PM_SUSPEND_ON))
- return D0;
+ return PCI_D0;
if (SUSPEND_EQ(state, PM_SUSPEND_STANDBY))
- return D1;
+ return PCI_D1;
if (SUSPEND_EQ(state, PM_SUSPEND_MEM))
- return D3hot;
+ return PCI_D3hot;
if (SUSPEND_EQ(state, PM_SUSPEND_DISK))
- return D3cold;
+ return PCI_D3cold;
BUG();
}

--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.076 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site