lkml.org 
[lkml]   [2012]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v3] ACPI/pci-bind: remove bind/unbind callbacks from acpi_device_ops
From
On Sun, Sep 16, 2012 at 9:49 AM, Yinghai Lu <yinghai@kernel.org> wrote:
> On Sun, Sep 16, 2012 at 7:09 AM, Jiang Liu <liuj97@gmail.com> wrote:
>> @@ -160,10 +160,13 @@ static int acpi_bind_one(struct device *dev, acpi_handle handle)
>> }
>> dev->archdata.acpi_handle = handle;
>>
>> - acpi_pci_bind_notify(dev->archdata.acpi_handle, dev, true);
>> -
>> status = acpi_bus_get_device(handle, &acpi_dev);
>> - if (!ACPI_FAILURE(status)) {
>> + if (!ACPI_FAILURE(status))
>> + acpi_dev = NULL;
>> +
>> + acpi_pci_bind_notify(dev->archdata.acpi_handle, acpi_dev, dev, true);
>
> It seems you can do
> acpi_pci_bind_notify(acpi_dev, dev, true);
> instead.
>
> aka:
> Do you have test case acpi_dev is not created before pci device?
>

updated your patch, and retrieve handle if needed from acpi_dev->handle or
pci_dev->dev.archdata.acpi_handle.

Thanks

Yinghai
[unhandled content-type:application/octet-stream]
\
 
 \ /
  Last update: 2012-09-16 20:41    [W:0.129 / U:0.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site