Hi, On Mon, Oct 29, 2012 at 10:06:33AM -0700, Dmitry Torokhov wrote: [ big snip ] > > > +static int __devexit smsc_remove(struct platform_device *pdev) > > > +{ > > > > shouldn't you unregister the input device here ?? > > And that is why I do not like devm_* interface myself... But no, since > input device was allocated with devm_input_allocate_device() it does not > need to be explicitly freed or unregistered. IMHO, that's a fragility on current devm implementation for input devices, then. devm_input_allocate_device() is *only* allocating the input device (at least judging by the name). Looks like you should introduce devm_input_register_device() ? What happens if I devm_input_allocate_device() but don't go as far as input_register_device() (some error happens in-between) ? I'm sure you have some proper handling for it, but it's quite misleading the way this was implemented. -- balbi
Attachment:
signature.asc
Description: Digital signature