On 3/3/06, Bjorn Helgaas <[EMAIL PROTECTED]> wrote:
> Yes.  But you have two devices, and acpi_button_add() will get called
> once for each of them, which is exactly what we want.  Your original
> question was about this line in acpi_button_add():
>
> 311         button = kmalloc(sizeof(struct acpi_button), GFP_KERNEL);
>
> This kmalloc will happen for every button device, but the pointer is
> attached to the acpi_device:
>
>         acpi_driver_data(device) = button;
>
> and the corresponding kfree is in acpi_button_remove().

You are right. I see acpi_button_add_fs() also handles the multiple
call case correctly. Thanks for helping explain this.

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

Reply via email to