From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Subject: Re: [PATCH 2/8] PM: suspend_block: Add driver to access suspend blockers from user-space Date: Thu, 29 Apr 2010 23:11:27 +0200 Message-ID: <201004292311.27400.rjw@sisk.pl> References: <1272429119-12103-1-git-send-email-arve@android.com> <201004290105.15707.rjw@sisk.pl> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: Arve =?iso-8859-1?q?Hj=F8nnev=E5g?= Cc: Len Brown , Jim Collar , linux-doc@vger.kernel.org, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Oleg Nesterov , Avi Kivity , Ryusuke Konishi , Tejun Heo , Magnus Damm , linux-pm@lists.linux-foundation.org, Andrew Morton List-Id: linux-pm@vger.kernel.org On Thursday 29 April 2010, Arve Hj=F8nnev=E5g wrote: > 2010/4/28 Rafael J. Wysocki : > > On Thursday 29 April 2010, Arve Hj=F8nnev=E5g wrote: > >> 2010/4/28 Rafael J. Wysocki : > >> > On Wednesday 28 April 2010, Arve Hj=F8nnev=E5g wrote: > >> >> Add a misc device, "suspend_blocker", that allows user-space proces= ses > >> >> to block auto suspend. The device has ioctls to create a suspend_bl= ocker, > >> >> and to block and unblock suspend. To delete the suspend_blocker, cl= ose > >> >> the device. > >> >> > >> >> Signed-off-by: Arve Hj=F8nnev=E5g > >> > ... > >> >> + > >> >> +#include > >> >> +#include > >> >> +#include > >> >> +#include > >> >> +#include > >> >> +#include > >> >> +#include > >> >> + > >> >> +enum { > >> >> + DEBUG_FAILURE =3D BIT(0), > >> >> +}; > >> >> +static int debug_mask =3D DEBUG_FAILURE; > >> > > >> > What's the exact purpose of this? > >> > >> To show errors returned to user space. I can turn it off by default if= you want. > > > > Not necessarily, but why is it a mask? It looks like a 0/1 thing would= be > > sufficient. > = > I may want to add a bit to print all user-space block and unblock calls. Alternatively, you can add a new parameter for that, which I think I would = prefer. Rafael