Re: Cleanup PCI power states

Pavel Machek
2004-12-17T23:41:00Z

Hi!

> > Okay, here it is, slightly expanded version. It actually makes use of
> > newly defined type for type-checking purposes; still no code changes.
>
> Alright, I've applied this, and it will show up in the next -mm release.
> I also fixed up pci.h for when CONFIG_PCI=N due to your changed
> functions.

Thanks... Hopefully I guessed the change right, otherwise this will
need to be applied by hand.

This adds missing prototype for pci_choose_state.

Signed-off-by: Pavel Machek <pavel@suse.cz>

--- linux.middle//include/linux/pci.h 2004-11-14 23:36:46.000000000 +0100
+++ linux/include/linux/pci.h 2004-12-18 00:35:33.000000000 +0100
@@ -790,6 +790,7 @@
int pci_save_state(struct pci_dev *dev, u32 *buffer);
int pci_restore_state(struct pci_dev *dev, u32 *buffer);
int pci_set_power_state(struct pci_dev *dev, pci_power_t state);
+pci_power_t pci_choose_state(struct pci_dev *dev, u32 state);
int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable);

/* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */
@@ -924,6 +925,7 @@
static inline int pci_save_state(struct pci_dev *dev, u32 *buffer) { return 0; }
static inline int pci_restore_state(struct pci_dev *dev, u32 *buffer) { return 0; }
static inline int pci_set_power_state(struct pci_dev *dev, pci_power_t state) { return 0; }
+static inline pci_power_t pci_choose_state(struct pci_dev *dev, u32 state) { return PCI_D0; }
static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable) { return 0; }

#define isa_bridge ((struct pci_dev *)NULL)

--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!