Re: [RFC 2/2] PM: Lock all devices during suspend/hibernate
From: Rafael J. Wysocki <hidden>
Date: 2007-08-01 15:37:52
From: Rafael J. Wysocki <hidden>
Date: 2007-08-01 15:37:52
On Wednesday, 1 August 2007 16:11, Alan Stern wrote:
On Wed, 1 Aug 2007, Rafael J. Wysocki wrote:quoted
quoted
+static DECLARE_RWSEM(device_registration_rwsem);Is it only intended for device registration, or can it be used in some other code paths too?The patch uses it only for registration, since that's where it is needed. I suppose it could be used on other paths as well, if anybody wanted to make something else mutually exclusive with suspend. (Although then it probably ought to be renamed...)
That was exactly my thought. Why don't we give it a more general name from the start? Greetings, Rafael -- "Premature optimization is the root of all evil." - Donald Knuth