Re: [PATCHv2 3/3] Input: twl4030-pwrbutton: simplify driver usingdevm_*

From: Aaro Koskinen
Date: Wed Oct 23 2013 - 12:30:23 EST


Hi,

On Wed, Oct 23, 2013 at 05:01:22PM +0200, Sebastian Reichel wrote:
> static int __exit twl4030_pwrbutton_remove(struct platform_device *pdev)
> {
> struct input_dev *pwr = platform_get_drvdata(pdev);
> - int irq = platform_get_irq(pdev, 0);
>
> - free_irq(irq, pwr);
> input_unregister_device(pwr);

You need convert the driver to use devm_input_allocate_device()
first. Otherwise driver will crash the kernel here if you get interrupt
after unregistering the device.

A.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/