Return-path: Received: from opensource.wolfsonmicro.com ([80.75.67.52]:58615 "EHLO opensource2.wolfsonmicro.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755986Ab1DFOL1 (ORCPT ); Wed, 6 Apr 2011 10:11:27 -0400 Date: Wed, 6 Apr 2011 23:11:33 +0900 From: Mark Brown To: Antonio Ospite Cc: linux-wireless@vger.kernel.org, openezx-devel@lists.openezx.org, "John W . Linville" , Johannes Berg , Liam Girdwood , linux-kernel@vger.kernel.org, Marek Vasut , Guiming Zhuo Subject: Re: [PATCH] rfkill: Regulator consumer driver for rfkill Message-ID: <20110406141131.GC2810@opensource.wolfsonmicro.com> References: <1302081679-812-1-git-send-email-ospite@studenti.unina.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <1302081679-812-1-git-send-email-ospite@studenti.unina.it> Sender: linux-wireless-owner@vger.kernel.org List-ID: On Wed, Apr 06, 2011 at 11:21:19AM +0200, Antonio Ospite wrote: > + tristate "Generic rfkill regulator driver" > + depends on RFKILL || !RFKILL That looks *odd*. Otherwise this looks fine from a regulator API point of view. You use an exclusive get() so you could get away without remembering the enable state as nothing else could hold the device open but there's no harm in doing so and it's defensive against silly constraints that force the regulator on.