Re: RESEND: [PATCH 2/3] ACPI: Send switch event on dock events

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

 



On Wed, 28 May 2008 14:33:49 +0100 Matthew Garrett <mjg59@xxxxxxxxxxxxx> wrote:

> Send a switch event on docking for consistency with docks that don't 
> present as a separate device.
> 
> Signed-off-by: Matthew Garrett <mjg@xxxxxxxxxx>
> 
> ---
> 
> diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
> index fa44fb9..a67e74c 100644
> --- a/drivers/acpi/dock.c
> +++ b/drivers/acpi/dock.c
> @@ -25,6 +25,7 @@
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/init.h>
> +#include <linux/input.h>
>  #include <linux/types.h>
>  #include <linux/notifier.h>
>  #include <linux/platform_device.h>
> @@ -65,6 +66,7 @@ struct dock_station {
>  	struct mutex hp_lock;
>  	struct list_head dependent_devices;
>  	struct list_head hotplug_devices;
> +	struct input_dev *dock_input;
>  };
>  
>  struct dock_dependent_device {
> @@ -345,10 +347,13 @@ static void dock_event(struct dock_station *ds, u32 event, int num)
>  	char event_string[13];
>  	char *envp[] = { event_string, NULL };
>  
> -	if (num == UNDOCK_EVENT)
> +	if (num == UNDOCK_EVENT) {
> +		input_report_switch(dock_station->dock_input, SW_DOCK, 0);

Is CONFIG_ACPI_DOCK=y, CONFIG_INPUT=n possible?  I think so..
--
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