Thread (6 messages) 6 messages, 3 authors, 2012-10-30

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

From: Felipe Balbi <hidden>
Date: 2012-10-29 19:11:53
Also in: linux-devicetree, linux-input, linux-omap

Hi,

On Mon, Oct 29, 2012 at 10:06:33AM -0700, Dmitry Torokhov wrote:

[ big snip ]
quoted
quoted
+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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help