Re: [RFC][PATCH 2/9] PCI: Introduce platform_pci_power_manageable function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

> +static struct pci_platform_pm_ops *pci_platform_pm;
> +
> +int pci_set_platform_pm(struct pci_platform_pm_ops *ops)
> +{
> +	if (!ops->is_manageable || !ops->set_state || !ops->choose_state)
> +		return -EINVAL;
> +	pci_platform_pm = ops;
> +	return 0;
> +}

BUG_ON? It is programmer error if we see NULLs here, right? (And those
programmers will be exactly those not checking the return value).

Otherwise looks ok to me.
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux