Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755286Ab0D1U6d (ORCPT ); Wed, 28 Apr 2010 16:58:33 -0400 Received: from ogre.sisk.pl ([217.79.144.158]:53422 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755177Ab0D1U6a convert rfc822-to-8bit (ORCPT ); Wed, 28 Apr 2010 16:58:30 -0400 From: "Rafael J. Wysocki" To: Arve =?utf-8?q?Hj=C3=B8nnev=C3=A5g?= Subject: Re: [PATCH 2/8] PM: suspend_block: Add driver to access suspend blockers from user-space Date: Wed, 28 Apr 2010 22:58:51 +0200 User-Agent: KMail/1.12.4 (Linux/2.6.34-rc4-rjw; KDE/4.3.5; x86_64; ; ) Cc: linux-pm@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Alan Stern , Tejun Heo , Oleg Nesterov , Randy Dunlap , Andrew Morton , Ryusuke Konishi , Jim Collar , "Greg Kroah-Hartman" , Avi Kivity , Len Brown , Pavel Machek , Magnus Damm , Cornelia Huck , Nigel Cunningham , linux-doc@vger.kernel.org References: <1272429119-12103-1-git-send-email-arve@android.com> <1272429119-12103-2-git-send-email-arve@android.com> <1272429119-12103-3-git-send-email-arve@android.com> In-Reply-To: <1272429119-12103-3-git-send-email-arve@android.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 8BIT Message-Id: <201004282258.51354.rjw@sisk.pl> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1203 Lines: 41 On Wednesday 28 April 2010, Arve Hjønnevåg wrote: > Add a misc device, "suspend_blocker", that allows user-space processes > to block auto suspend. The device has ioctls to create a suspend_blocker, > and to block and unblock suspend. To delete the suspend_blocker, close > the device. > > Signed-off-by: Arve Hjønnevåg ... > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +enum { > + DEBUG_FAILURE = BIT(0), > +}; > +static int debug_mask = DEBUG_FAILURE; What's the exact purpose of this? > +module_param_named(debug_mask, debug_mask, int, S_IRUGO | S_IWUSR | S_IWGRP); > + > +static DEFINE_MUTEX(ioctl_lock); > + > +struct user_suspend_blocker { > + struct suspend_blocker blocker; > + char name[0]; > +}; Why is this not in a header? Rafael -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/