[PATCH] Implement retry on linux sysfs pnp id file.

Drew Moseley dmoseley at mvista.com
Tue Sep 23 09:12:52 PDT 2008


Kay Sievers wrote:
>> This is a really dirty hack. 
>>
>> @Kay: Is this behavior normal? Is there a way to fix sysfs instead of sending 
>> HAL into a loop?
> 
> Yep, "fix the kernel" is usually the right answer. There is almost
> never a valid "the way it has to be" in sysfs. We fixed almost all know
> issues so far, so this should be fixed too.
> 
> In:
>   drivers/pnp/core.c
> we have:
>         ret = device_register(&dev->dev);
>         if (ret)
>                 return ret;
> 
>         pnp_interface_attach_device(dev);
> 
> Which is broken, the attributes must not be created after the device
> registration, they should be converted to "default bus attributes" and
> all will work fine.
> 

I certainly don't dispute the fact that this patch is less than ideal.
I have at lease one more issue that appears to be similar.  I'll take a
look at the default bus attributes and see what I find.  Thanks for the
pointer.

Drew


More information about the hal mailing list