Re: [PATCH 2.6.17.4 1/1] ACPI,INPUT: Move atlas to input

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

 



On 7/25/06, Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx> wrote:
Hi Jaya,

On 7/25/06, jayakumar.acpi@xxxxxxxxx <jayakumar.acpi@xxxxxxxxx> wrote:
> +static acpi_status acpi_atlas_button_handler(u32 function,
> +                     acpi_physical_address address,
> +                     u32 bit_width, acpi_integer *value,
> +                     void *handler_context, void *region_context)
> +{
> +       acpi_status status;

Let's do:
     unsigned long addr = (unisigned long) address;

Ok. I'll take out the casting. It's not needed except for the printk.


> +
> +       if (function == ACPI_WRITE)
> +               atlas_input_report((u8) address);

     input_report_key(input_dev, KEY_F1 + (addr & 0x0f), !(addr & 0x10));

Ok. Will do.


> +       else {
> +               printk(KERN_WARNING "atlas: shrugged on unexpected function"
> +                       ":function=%x,address=%lx,value=%x\n",
> +                       function, (unsigned long)address, (u32)*value);
      function, addr, (u32)*value);

[hmm, shouldn't it be *((u32*)value)?]

The original looks ok to me because I just want to cast the value to a u32.


... and kill atlas_input_report. Now that the module is a pure input
driver you can fold some functions together.

Yup, you are right. I'll clean it up.


This will leak input_dev if acpi_install_address_space_handler fails.
Please fold atlast_setup_input and atlast_acpi_button_add together
into one function (same goes for remove).

Oops, I see that now. Will do. Thanks for the feedback.

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