From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933803Ab3BZX7t (ORCPT ); Tue, 26 Feb 2013 18:59:49 -0500 Received: from hydra.sisk.pl ([212.160.235.94]:45754 "EHLO hydra.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932934Ab3BZX7r convert rfc822-to-8bit (ORCPT ); Tue, 26 Feb 2013 18:59:47 -0500 From: "Rafael J. Wysocki" To: Toshi Kani Cc: ACPI Devel Maling List , Bjorn Helgaas , LKML , Yinghai Lu , Yasuaki Ishimatsu , Jiang Liu Subject: Re: [PATCH v2, 3/7] ACPI / container: Use common hotplug code Date: Wed, 27 Feb 2013 01:06:31 +0100 Message-ID: <1628702.MGgBQmm2Nl@vostro.rjw.lan> User-Agent: KMail/4.9.5 (Linux/3.8.0; KDE/4.9.5; x86_64; ; ) In-Reply-To: <1361920386.12845.99.camel@misato.fc.hp.com> References: <3260206.bhaAobGhpZ@vostro.rjw.lan> <2961608.xElddy7TSk@vostro.rjw.lan> <1361920386.12845.99.camel@misato.fc.hp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday, February 26, 2013 04:13:06 PM Toshi Kani wrote: > On Tue, 2013-02-26 at 23:46 +0100, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > > > Switch the ACPI container driver to using common device hotplug code > > introduced previously. This reduces the driver down to a trivial > > definition and registration of a struct acpi_scan_handler object. > > > > Signed-off-by: Rafael J. Wysocki > > --- > > drivers/acpi/container.c | 146 +++-------------------------------------------- > > 1 file changed, 10 insertions(+), 136 deletions(-) > > > > Index: test/drivers/acpi/container.c > > =================================================================== > > --- test.orig/drivers/acpi/container.c > > +++ test/drivers/acpi/container.c > > @@ -1,12 +1,12 @@ > > /* > > - * acpi_container.c - ACPI Generic Container Driver > > - * ($Revision: ) > > + * container.c - ACPI Generic Container Driver > > * > > * Copyright (C) 2004 Anil S Keshavamurthy (anil.s.keshavamurthy@intel.com) > > * Copyright (C) 2004 Keiichiro Tokunaga (tokunaga.keiich@jp.fujitsu.com) > > * Copyright (C) 2004 Motoyuki Ito (motoyuki@soft.fujitsu.com) > > - * Copyright (C) 2004 Intel Corp. > > * Copyright (C) 2004 FUJITSU LIMITED > > + * Copyright (C) 2004, 2013 Intel Corp. > > + * Author: Rafael J. Wysocki > > * > > * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > * > > @@ -26,14 +26,9 @@ > > * > > * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > */ > > -#include > > -#include > > -#include > > -#include > > -#include > > #include > > -#include > > -#include > > + > > +#include "internal.h" > > > > #define PREFIX "ACPI: " > > > > @@ -50,141 +45,20 @@ static const struct acpi_device_id conta > > static int container_device_attach(struct acpi_device *device, > > const struct acpi_device_id *not_used) > > { > > - /* > > - * FIXME: This is necessary, so that acpi_eject_store() doesn't return > > - * -ENODEV for containers. > > - */ > > + /* This is necessary for container hotplug to work. */ > > return 1; > > } > > > > static struct acpi_scan_handler container_device_handler = { > > .ids = container_device_ids, > > .attach = container_device_attach, > > + .hotplug = { > > + .enabled = true, > > + .user_eject = true, > > I am not able to compile this patch 3/7... user_eject is not defined in > patch 2/7. > > CC drivers/acpi/container.o > drivers/acpi/container.c:57:3: error: unknown field ‘user_eject’ > specified in initializer I forgot the refresh the patch, sorry. Will send an update shortly. Thanks, Rafael -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.