Re: [patch] enums to clear suspend-state confusion

Benjamin Herrenschmidt
2004-08-18T02:14:03Z

> Now, Patrick has some plans with device power managment and they
> included something bigger being passed down to the drivers. I wanted
> to prepare for those plans.
>
> I can replace suspend_state_t with enum system_state, but it might
> mean that enum system_state will have to be extended with things like
> RUNTIME_PM_PCI_D0 in future... I guess that's easiest thing to do. It
> solves all the problems we have *now*.

Better is to use a typedef then, so that enum can be turned into a
pointer to a structure later on, and drivers using the "helper"
function to_pci_state() would not need any change when that transition
happen.

Ben.