linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] Input: samsung-keypad: Remove input_unregister_device() call
@ 2013-01-09  6:43 Sachin Kamat
  2013-01-09  9:21 ` Dmitry Torokhov
  0 siblings, 1 reply; 3+ messages in thread
From: Sachin Kamat @ 2013-01-09  6:43 UTC (permalink / raw)
  To: linux-input; +Cc: dmitry.torokhov, sachin.kamat, patches

Since devm_input_allocate_device() is used, explicit unregistering
of device is not required as it is handled by devres infrastructure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/input/keyboard/samsung-keypad.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/input/keyboard/samsung-keypad.c b/drivers/input/keyboard/samsung-keypad.c
index 22e357b..fab8972 100644
--- a/drivers/input/keyboard/samsung-keypad.c
+++ b/drivers/input/keyboard/samsung-keypad.c
@@ -501,8 +501,6 @@ static int samsung_keypad_remove(struct platform_device *pdev)
 	device_init_wakeup(&pdev->dev, 0);
 	platform_set_drvdata(pdev, NULL);
 
-	input_unregister_device(keypad->input_dev);
-
 	clk_unprepare(keypad->clk);
 
 	return 0;
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] Input: samsung-keypad: Remove input_unregister_device() call
  2013-01-09  6:43 [PATCH 1/1] Input: samsung-keypad: Remove input_unregister_device() call Sachin Kamat
@ 2013-01-09  9:21 ` Dmitry Torokhov
  2013-01-09  9:24   ` Sachin Kamat
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Torokhov @ 2013-01-09  9:21 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-input, patches

On Wed, Jan 09, 2013 at 12:13:49PM +0530, Sachin Kamat wrote:
> Since devm_input_allocate_device() is used, explicit unregistering
> of device is not required as it is handled by devres infrastructure.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>  drivers/input/keyboard/samsung-keypad.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/input/keyboard/samsung-keypad.c b/drivers/input/keyboard/samsung-keypad.c
> index 22e357b..fab8972 100644
> --- a/drivers/input/keyboard/samsung-keypad.c
> +++ b/drivers/input/keyboard/samsung-keypad.c
> @@ -501,8 +501,6 @@ static int samsung_keypad_remove(struct platform_device *pdev)
>  	device_init_wakeup(&pdev->dev, 0);
>  	platform_set_drvdata(pdev, NULL);
>  
> -	input_unregister_device(keypad->input_dev);
> -
>  	clk_unprepare(keypad->clk);
>  

No, don't you see clk_unprepare() call? The device must be unregistered
before calling clk_unprepare() to keep proper order of operations.

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] Input: samsung-keypad: Remove input_unregister_device() call
  2013-01-09  9:21 ` Dmitry Torokhov
@ 2013-01-09  9:24   ` Sachin Kamat
  0 siblings, 0 replies; 3+ messages in thread
From: Sachin Kamat @ 2013-01-09  9:24 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input, patches

On 9 January 2013 14:51, Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> On Wed, Jan 09, 2013 at 12:13:49PM +0530, Sachin Kamat wrote:
>> Since devm_input_allocate_device() is used, explicit unregistering
>> of device is not required as it is handled by devres infrastructure.
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>> ---
>>  drivers/input/keyboard/samsung-keypad.c |    2 --
>>  1 files changed, 0 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/input/keyboard/samsung-keypad.c b/drivers/input/keyboard/samsung-keypad.c
>> index 22e357b..fab8972 100644
>> --- a/drivers/input/keyboard/samsung-keypad.c
>> +++ b/drivers/input/keyboard/samsung-keypad.c
>> @@ -501,8 +501,6 @@ static int samsung_keypad_remove(struct platform_device *pdev)
>>       device_init_wakeup(&pdev->dev, 0);
>>       platform_set_drvdata(pdev, NULL);
>>
>> -     input_unregister_device(keypad->input_dev);
>> -
>>       clk_unprepare(keypad->clk);
>>
>
> No, don't you see clk_unprepare() call? The device must be unregistered
> before calling clk_unprepare() to keep proper order of operations.

Sorry, my bad. I overlooked it. Thanks for noticing.

>
> Thanks.
>
> --
> Dmitry



-- 
With warm regards,
Sachin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-09  9:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-09  6:43 [PATCH 1/1] Input: samsung-keypad: Remove input_unregister_device() call Sachin Kamat
2013-01-09  9:21 ` Dmitry Torokhov
2013-01-09  9:24   ` Sachin Kamat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).