Skip to contentSkip to conversation

still crap in pci_choose_state

DISCUSSION Pavel Machek 1 participant 1 message Jul 11, 2005 ACPI

lore
Share & tools
lore
#0 lore raw

Hi!

This is in drivers/pci/pci.c; and it is still wrong. You can't just retype int into pm_message_t. Make it pm_message_t &state, and return only success/failure in platform_pci_choose_state return value. Or add PCI_POWER_ERROR to pci_power_t enum and use that.
Pavel

int (*platform_pci_choose_state)(struct pci_dev *dev, pm_message_t state);

pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state)

{
        int     ret;
        if (!pci_find_capability(dev, PCI_CAP_ID_PM))
                return PCI_D0;

        if (platform_pci_choose_state) {
                ret = platform_pci_choose_state(dev, state);
                if (ret >= 0)
                        state = ret;
        }
        switch (state) {
Signature · 8 lines
teflon -- maybe it is a trademark, but it should not be.


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar