Re: [PATCH] ACPI: thinkpad-acpi: register input device

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

 



Hi,

On Saturday 26 May 2007 13:31, Henrique de Moraes Holschuh wrote:
> Register an input device to send input events to userspace.
> 
> This patch is based on a patch by Richard Hughes <hughsient@xxxxxxxxx>.
> 
> Signed-off-by: Henrique de Moraes Holschuh <hmh@xxxxxxxxxx>
> Cc: Richard Hughes <hughsient@xxxxxxxxx>

Looks OK, however I am curious why you split registration and generating
input events into 2 patches...
 
> ---
>  drivers/misc/thinkpad_acpi.c |   31 +++++++++++++++++++++++++++++--
>  drivers/misc/thinkpad_acpi.h |    3 +++
>  2 files changed, 32 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
> index e1c84e3..c0b8155 100644
> --- a/drivers/misc/thinkpad_acpi.c
> +++ b/drivers/misc/thinkpad_acpi.c
> @@ -487,13 +487,14 @@ static char *next_cmd(char **cmds)
>  /****************************************************************************
>   ****************************************************************************
>   *
> - * Device model: hwmon and platform
> + * Device model: input, hwmon and platform
>   *
>   ****************************************************************************
>   ****************************************************************************/
>  
>  static struct platform_device *tpacpi_pdev = NULL;
>  static struct class_device *tpacpi_hwmon = NULL;
> +static struct input_dev *tpacpi_inputdev = NULL;
>  

Why do you initialize static variables?  They are guaranteed to be 0/NULL.

-- 
Dmitry
-
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