Re: [PATCH v2, 3/7] ACPI / container: Use common hotplug code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2013-02-26 at 23:46 +0100, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
> 
> 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 <rafael.j.wysocki@xxxxxxxxx>
> ---
>  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@xxxxxxxxx)
>   * Copyright (C) 2004 Keiichiro Tokunaga (tokunaga.keiich@xxxxxxxxxxxxxx)
>   * Copyright (C) 2004 Motoyuki Ito (motoyuki@xxxxxxxxxxxxxxxx)
> - * Copyright (C) 2004 Intel Corp.
>   * Copyright (C) 2004 FUJITSU LIMITED
> + * Copyright (C) 2004, 2013 Intel Corp.
> + * Author: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
>   *
>   * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   *
> @@ -26,14 +26,9 @@
>   *
>   * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   */
> -#include <linux/kernel.h>
> -#include <linux/module.h>
> -#include <linux/init.h>
> -#include <linux/slab.h>
> -#include <linux/types.h>
>  #include <linux/acpi.h>
> -#include <acpi/acpi_bus.h>
> -#include <acpi/acpi_drivers.h>
> +
> +#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

-Toshi

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux