Re: [PATCH] Runtime PM: Adding explicit check to make sure dev->parent supports runtime PM before accessing its PM fields.

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

 



On Sat, 5 Dec 2009, Mahalingam, Nithish wrote:

> > The most troublesome case arises when you have a parent which is 
> > disabled for runtime PM and later on becomes enabled.  This may not 
> > happen very often -- it may not happen at all.  I would expect that if 
> > a device changes from disabled to enabled, it probably does so before 
> > acquiring any children.  But we can't be certain of this.
> 
> OK, get what you are saying. I was thinking of a particular use case and 
> before I talk about that let me prototype and see if I hit this 
> particular case.

All right.  If it does turn out that devices _never_ change from 
disabled to enabled while they have children (we could add a check for 
this!) then you are right -- it's not necessary to update 
parent->power.child_count if the parent is disabled.

But the only way to be sure it will never happen is to forbid it
explicitly in the documentation.

Alan Stern

_______________________________________________
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