From mboxrd@z Thu Jan 1 00:00:00 1970 From: Toshi Kani Subject: Re: [PATCH 01/02] ACPI: sysfs eject support for ACPI scan handlers Date: Thu, 07 Feb 2013 18:25:10 -0700 Message-ID: <1360286710.3869.53.camel@misato.fc.hp.com> References: <1360191056-13293-1-git-send-email-toshi.kani@hp.com> <1360191056-13293-2-git-send-email-toshi.kani@hp.com> <51144BD4.7070804@jp.fujitsu.com> <1360285813.3869.52.camel@misato.fc.hp.com> <511455D3.6020602@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <511455D3.6020602@jp.fujitsu.com> Sender: linux-kernel-owner@vger.kernel.org To: Yasuaki Ishimatsu Cc: rjw@sisk.pl, linux-acpi@vger.kernel.org, gregkh@linuxfoundation.org, bhelgaas@google.com, mika.westerberg@linux.intel.com, matthew.garrett@nebula.com, yinghai@kernel.org, liuj97@gmail.com, linux-kernel@vger.kernel.org List-Id: linux-acpi@vger.kernel.org On Fri, 2013-02-08 at 10:33 +0900, Yasuaki Ishimatsu wrote: > 2013/02/08 10:10, Toshi Kani wrote: > > On Fri, 2013-02-08 at 09:50 +0900, Yasuaki Ishimatsu wrote: > >> Hi Toshi, > >> > >> 2013/02/07 7:50, Toshi Kani wrote: > >>> Changed sysfs eject, acpi_eject_store(), to support ACPI scan handlers. > >>> > >>> Signed-off-by: Toshi Kani > >>> --- > >>> drivers/acpi/scan.c | 2 +- > >>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>> > >>> diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c > >>> index cfd7a69..3ff632e 100644 > >>> --- a/drivers/acpi/scan.c > >>> +++ b/drivers/acpi/scan.c > >>> @@ -203,7 +203,7 @@ acpi_eject_store(struct device *d, struct device_attribute *attr, > >>> return -EINVAL; > >>> } > >>> #ifndef FORCE_EJECT > >> > >>> - if (acpi_device->driver == NULL) { > >>> + if (!acpi_device->driver && !acpi_device->handler) { > >> > >> I don't understand the fix. > >> > >> The if sentence becomes true, when both acpi_device->driver and acpi_device->handler > >> are NULL. It means that acpi_eject_store() runs if either acpi_device->driver or > >> acpi_device->handler has pointer. Is it O.K.? > > > > Yes. > > > >> I think it should be if (!acpi_device->driver || !acpi_device->handler). > > > > No, the condition has to be "&&" because an acpi_device is _either_ > > bound to an ACPI driver or an ACPI scan handler. > > Thank you for you clarification. I understood it. > > Acked-by: Yasuaki Ishimatsu Thanks Yasuaki! -Toshi > > Thanks, > Yasuaki Ishimatsu > > > > > Thanks, > > -Toshi > > > > > >