RE: still crap in pci_choose_state

Li, Shaohua
2005-07-12T00:49:10Z

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) {
Ok, I'll do it soon. Is the pm_message_t a structure now? I plan to fix
it after pm_message_t structure change (current pm_message_t is really
useless for ACPI), but maybe I should fix the bug at hand first.

Thanks,
Shaohua