# Re: \[PATCHv5\] Input: keypad: Add smsc ece1099 keypad driver

- From: Felipe Balbi \<hidden\>
- Date: 2012-10-29 19:11:53 
- List: linux-devicetree
- Page: https://ratatoskr.run/linux-devicetree/2012/10/3948051
- Thread: https://ratatoskr.run/linux-input/2012/10/3947653/t.md

```text
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
```

## Attachments

- [signature.asc](https://ratatoskr.run/linux-devicetree/2012/10/3948051/attachment/0) (application/pgp-signature, 836 bytes)
