Thread (14 messages) flat view 14 messages, 3 authors, 2012-11-20

Re: [PATCH 1/3] input: stmpe-keyboard: Use devm_*() routines

From: Viresh Kumar <viresh.kumar@linaro.org>
Date: 2012-11-09 17:03:59
Also in: lkml

On 9 November 2012 22:15, Dmitry Torokhov [off-list ref] wrote:
If input device was alocated with devm_* interface it does not need be
explicitly unregistered/freed.
Thanks for pointing out:

Fixup:

commit 4bf57c85f49f16a139af80f8de76fa01eee77a5d
Author: Viresh Kumar [off-list ref]
Date:   Fri Nov 9 22:31:34 2012 +0530

    fixup! input: stmpe-keyboard: Use devm_*() routines
---
 drivers/input/keyboard/stmpe-keypad.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/input/keyboard/stmpe-keypad.c
b/drivers/input/keyboard/stmpe-keypad.c
index 6e25497..706b16f 100644
--- a/drivers/input/keyboard/stmpe-keypad.c
+++ b/drivers/input/keyboard/stmpe-keypad.c
@@ -326,16 +326,12 @@ static int __devinit stmpe_keypad_probe(struct
platform_device *pdev)
                        IRQF_ONESHOT, "stmpe-keypad", keypad);
        if (ret) {
                dev_err(&pdev->dev, "unable to get irq: %d\n", ret);
-               goto out_unregisterinput;
+               return ret;
        }

        platform_set_drvdata(pdev, keypad);

        return 0;
-
-out_unregisterinput:
-       input_unregister_device(input);
-       return ret;
 }

 static int __devexit stmpe_keypad_remove(struct platform_device *pdev)
@@ -344,7 +340,6 @@ static int __devexit stmpe_keypad_remove(struct
platform_device *pdev)
        struct stmpe *stmpe = keypad->stmpe;

        stmpe_disable(stmpe, STMPE_BLOCK_KEYPAD);
-       input_unregister_device(keypad->input);

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