lkml.org 
[lkml]   [2013]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] ACPI: Do not fail acpi_bind_one() if device is already bound correctly
Date
On Saturday, August 03, 2013 06:32:02 PM Toshi Kani wrote:
> On Sat, 2013-08-03 at 02:47 +0200, Rafael J. Wysocki wrote:
> > On Friday, August 02, 2013 04:38:38 PM Toshi Kani wrote:
> > > On Fri, 2013-08-02 at 00:33 +0200, Rafael J. Wysocki wrote:
> > > > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > > >
> > > > Modify acpi_bind_one() so that it doesn't fail if the device
> > > > represented by its first argument has already been bound to the
> > > > given ACPI handle (second argument), because that is not a good
> > > > enough reason for returning an error code.
> > >
> > > While it seems reasonable to allow such case, I do not think we will hit
> > > this case under the normal scenarios. So, I do not think we need to
> > > make this change now unless it actually solves Yasuaki's issue (which I
> > > am guessing not).
> >
> > In theory it should be possible to call acpi_bind_one() twice in a row
> > for the same dev and the same handle without failure, that simply is
> > logical. The patch may not fix any problems visible now, but returning an
> > error code in such a case is simply incorrect.
>
> We changed acpi_bus_device_attach() to not call the handler or driver
> again if it is already bound. So, I was under impression that we
> prevent from attaching a same device twice. But I may be missing
> something...

acpi_bind_one() may be called in code paths that don't start from
acpi_bus_device_attach(), like acpi_platform_notify(), where the result
depends on how .find_device() is implemented by the the given bus type,
for example.

Thanks,
Rafael


--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.


\
 
 \ /
  Last update: 2013-08-04 16:01    [W:0.064 / U:0.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site