lkml.org 
[lkml]   [2006]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 2/3] acpiphp: add dock event handling
At Thu, 23 Feb 2006 11:56:17 -0800,
Kristen Accardi <kristen.c.accardi@intel.com> wrote:
>
> @@ -828,11 +862,21 @@ static int acpiphp_bus_add(struct acpiph
> dbg("no parent device, assuming NULL\n");
> pdevice = NULL;
> }
> + if (!acpi_bus_get_device(func->handle, &device)) {
> + dbg("bus exists... trim\n");
> + /* this shouldn't be in here, so remove
> + * the bus then re-add it...
> + */
> + ret_val = acpi_bus_trim(device, 1);
> + dbg("acpi_bus_trim return %x\n", ret_val);
> + }
> ret_val = acpi_bus_add(&device, pdevice, func->handle,
> - ACPI_BUS_TYPE_DEVICE);
> - if (ret_val)
> - dbg("cannot add bridge to acpi list\n");
> -
> + ACPI_BUS_TYPE_DEVICE);
> + if (ret_val) {
> + dbg("error adding bus, %x\n",
> + -ret_val);
> + goto acpiphp_bus_add_out;
> + }
> /*
> * try to start anyway. We could have failed to add
> * simply because this bus had previously been added

Hi Kristen,

Why don't you call acpi_bus_trim() when the device is
removed. This time, eject_dock() or disable_device()?
So you don't need to call acpi_bus_trim() as error case.

Thanks,
MUNE

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-02-24 07:15    [W:0.060 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site