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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux