[PATCHv5] Input: keypad: Add smsc ece1099 keypad driver

Felipe Balbi balbi at ti.com
Tue Oct 30 06:05:53 EST 2012


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/devicetree-discuss/attachments/20121029/fa53a81e/attachment.sig>


More information about the devicetree-discuss mailing list