On Thu, 2009-04-30 at 12:53 -0300, Henrique de Moraes Holschuh wrote: > > Actually, I was going to clean this up, and then I noticed you're > > wrong. :) Returning ERR_PTR(-ENODEV) is intentional, in the non-RFKILL > > case. Imagine a driver like this: > > Well, that's confusing as all heck... document it, please? Well, ok. I don't really think it's all that confusing since you don't need to think about the non-RFKILL code, you can just write the code as though rfkill was always enabled. > I still think in > that case, we'd be better off if rfkill_alloc always uses the ERR_PTR > convention. Umm, no, think again. If we do that, the driver won't do if (!rf) but if (IS_ERR(rf)) and the advantage is lost. This is exactly what debugfs does too. johannes
Attachment:
signature.asc
Description: This is a digitally signed message part