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

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

 



On 9 November 2012 22:15, Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx> 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 <viresh.kumar@xxxxxxxxxx>
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;
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux