On Tue, 2008-06-17 at 02:14 +0200, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki <rjw@xxxxxxx> > > Introduce function pointer platform_pci_power_manageable to be used > by the platform-related code to point to a function allowing us to > check if given device is power manageable by the platform. > > Introduce acpi_pci_power_manageable() playing that role for ACPI. > > Signed-off-by: Rafael J. Wysocki <rjw@xxxxxxx> > --- > drivers/pci/pci-acpi.c | 11 +++++++++++ > drivers/pci/pci.c | 1 + > drivers/pci/pci.h | 1 + > 3 files changed, 13 insertions(+) > > Index: linux-2.6/drivers/pci/pci-acpi.c > =================================================================== > --- linux-2.6.orig/drivers/pci/pci-acpi.c > +++ linux-2.6/drivers/pci/pci-acpi.c > @@ -315,6 +315,16 @@ static pci_power_t acpi_pci_choose_state > } > #endif > > +static bool acpi_pci_power_manageable(struct pci_dev *dev) > +{ > + acpi_handle handle = DEVICE_ACPI_HANDLE(&dev->dev); > + > + if (!handle) > + return -ENODEV; Seems like a bad idea to pass non-true/false values using a bool. Wouldn't an int return type be more appropriate here? <snip> Cheers, -Matt Helsley -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html