* [PATCH] virtio: pci: remove unnecessary pci_set_drvdata()
@ 2013-11-25 3:23 Jingoo Han
2013-12-01 10:37 ` Rusty Russell
0 siblings, 1 reply; 2+ messages in thread
From: Jingoo Han @ 2013-11-25 3:23 UTC (permalink / raw)
To: 'Rusty Russell'
Cc: 'Jingoo Han', 'Michael S. Tsirkin',
'Andrew Vagin', virtualization
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/virtio/virtio_pci.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index a37c699..a416f9b 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -742,7 +742,6 @@ static int virtio_pci_probe(struct pci_dev *pci_dev,
return 0;
out_set_drvdata:
- pci_set_drvdata(pci_dev, NULL);
pci_iounmap(pci_dev, vp_dev->ioaddr);
out_req_regions:
pci_release_regions(pci_dev);
@@ -760,7 +759,6 @@ static void virtio_pci_remove(struct pci_dev *pci_dev)
unregister_virtio_device(&vp_dev->vdev);
vp_del_vqs(&vp_dev->vdev);
- pci_set_drvdata(pci_dev, NULL);
pci_iounmap(pci_dev, vp_dev->ioaddr);
pci_release_regions(pci_dev);
pci_disable_device(pci_dev);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] virtio: pci: remove unnecessary pci_set_drvdata()
2013-11-25 3:23 [PATCH] virtio: pci: remove unnecessary pci_set_drvdata() Jingoo Han
@ 2013-12-01 10:37 ` Rusty Russell
0 siblings, 0 replies; 2+ messages in thread
From: Rusty Russell @ 2013-12-01 10:37 UTC (permalink / raw)
Cc: 'Jingoo Han', 'Michael S. Tsirkin',
'Andrew Vagin', virtualization
Jingoo Han <jg1.han@samsung.com> writes:
> 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.
Thanks,
Rusty.
> ---
> drivers/virtio/virtio_pci.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
> index a37c699..a416f9b 100644
> --- a/drivers/virtio/virtio_pci.c
> +++ b/drivers/virtio/virtio_pci.c
> @@ -742,7 +742,6 @@ static int virtio_pci_probe(struct pci_dev *pci_dev,
> return 0;
>
> out_set_drvdata:
> - pci_set_drvdata(pci_dev, NULL);
> pci_iounmap(pci_dev, vp_dev->ioaddr);
> out_req_regions:
> pci_release_regions(pci_dev);
> @@ -760,7 +759,6 @@ static void virtio_pci_remove(struct pci_dev *pci_dev)
> unregister_virtio_device(&vp_dev->vdev);
>
> vp_del_vqs(&vp_dev->vdev);
> - pci_set_drvdata(pci_dev, NULL);
> pci_iounmap(pci_dev, vp_dev->ioaddr);
> pci_release_regions(pci_dev);
> pci_disable_device(pci_dev);
> --
> 1.7.10.4
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-01 10:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-25 3:23 [PATCH] virtio: pci: remove unnecessary pci_set_drvdata() Jingoo Han
2013-12-01 10:37 ` Rusty Russell
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).