linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: serio: remove unnecessary pci_set_drvdata()
@ 2013-11-25  2:13 Jingoo Han
  2013-11-26  2:11 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Jingoo Han @ 2013-11-25  2:13 UTC (permalink / raw)
  To: 'Dmitry Torokhov'
  Cc: 'Dmitry Torokhov', linux-input, 'Jingoo Han'

The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/input/serio/pcips2.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/input/serio/pcips2.c b/drivers/input/serio/pcips2.c
index 76f8383..13062f6 100644
--- a/drivers/input/serio/pcips2.c
+++ b/drivers/input/serio/pcips2.c
@@ -181,7 +181,6 @@ static void pcips2_remove(struct pci_dev *dev)
 	struct pcips2_data *ps2if = pci_get_drvdata(dev);
 
 	serio_unregister_port(ps2if->io);
-	pci_set_drvdata(dev, NULL);
 	kfree(ps2if);
 	pci_release_regions(dev);
 	pci_disable_device(dev);
-- 
1.7.10.4



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

* Re: [PATCH] Input: serio: remove unnecessary pci_set_drvdata()
  2013-11-25  2:13 [PATCH] Input: serio: remove unnecessary pci_set_drvdata() Jingoo Han
@ 2013-11-26  2:11 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2013-11-26  2:11 UTC (permalink / raw)
  To: Jingoo Han; +Cc: linux-input

On Mon, Nov 25, 2013 at 11:13:46AM +0900, Jingoo Han wrote:
> The driver core clears the driver data to NULL after device_release
> or on probe failure. Thus, it is not needed to manually clear the
> device driver data to NULL.
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Applied, thank you.

> ---
>  drivers/input/serio/pcips2.c |    1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/input/serio/pcips2.c b/drivers/input/serio/pcips2.c
> index 76f8383..13062f6 100644
> --- a/drivers/input/serio/pcips2.c
> +++ b/drivers/input/serio/pcips2.c
> @@ -181,7 +181,6 @@ static void pcips2_remove(struct pci_dev *dev)
>  	struct pcips2_data *ps2if = pci_get_drvdata(dev);
>  
>  	serio_unregister_port(ps2if->io);
> -	pci_set_drvdata(dev, NULL);
>  	kfree(ps2if);
>  	pci_release_regions(dev);
>  	pci_disable_device(dev);
> -- 
> 1.7.10.4
> 
> 

-- 
Dmitry

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

end of thread, other threads:[~2013-11-26  2:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-25  2:13 [PATCH] Input: serio: remove unnecessary pci_set_drvdata() Jingoo Han
2013-11-26  2:11 ` Dmitry Torokhov

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).