Displaying 20 results from an estimated 173 matches for "pci_set_drvdata".
2013 Nov 25
1
[PATCH] virtio: pci: remove unnecessary pci_set_drvdata()
...hanged, 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,...
2013 Nov 25
1
[PATCH] virtio: pci: remove unnecessary pci_set_drvdata()
...hanged, 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,...
2011 Jan 05
3
[PATCH] virtio-pci: add softlinks between virtio and pci
...v.kobj, &pci_dev->dev.kobj,
+ "bus_device");
+ if (err)
+ goto out_create_link;
+ return 0;
+out_create_link:
+ sysfs_remove_link(&pci_dev->dev.kobj, "virtio_device");
+out_register_device:
+ unregister_virtio_device(&vp_dev->vdev);
out_set_drvdata:
pci_set_drvdata(pci_dev, NULL);
pci_iounmap(pci_dev, vp_dev->ioaddr);
@@ -685,6 +699,8 @@ static void __devexit virtio_pci_remove(struct pci_dev *pci_dev)
{
struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev);
+ sysfs_remove_link(&vp_dev->vdev.dev.kobj, "bus_device");
+ sysfs_rem...
2011 Jan 05
3
[PATCH] virtio-pci: add softlinks between virtio and pci
...v.kobj, &pci_dev->dev.kobj,
+ "bus_device");
+ if (err)
+ goto out_create_link;
+ return 0;
+out_create_link:
+ sysfs_remove_link(&pci_dev->dev.kobj, "virtio_device");
+out_register_device:
+ unregister_virtio_device(&vp_dev->vdev);
out_set_drvdata:
pci_set_drvdata(pci_dev, NULL);
pci_iounmap(pci_dev, vp_dev->ioaddr);
@@ -685,6 +699,8 @@ static void __devexit virtio_pci_remove(struct pci_dev *pci_dev)
{
struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev);
+ sysfs_remove_link(&vp_dev->vdev.dev.kobj, "bus_device");
+ sysfs_rem...
2009 Nov 29
1
[PATCH] virtio: set pci bus master enable bit
...), 0 deletions(-)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 28d9cf7..717bae1 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -648,6 +648,7 @@ static int __devinit virtio_pci_probe(struct pci_dev *pci_dev,
goto out_req_regions;
pci_set_drvdata(pci_dev, vp_dev);
+ pci_set_master(pci_dev);
/* we use the subsystem vendor/device id as the virtio vendor/device
* id. this allows us to use the same PCI vendor/device id for all
--
1.6.5.2.143.g8cc62
2009 Nov 29
1
[PATCH] virtio: set pci bus master enable bit
...), 0 deletions(-)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 28d9cf7..717bae1 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -648,6 +648,7 @@ static int __devinit virtio_pci_probe(struct pci_dev *pci_dev,
goto out_req_regions;
pci_set_drvdata(pci_dev, vp_dev);
+ pci_set_master(pci_dev);
/* we use the subsystem vendor/device id as the virtio vendor/device
* id. this allows us to use the same PCI vendor/device id for all
--
1.6.5.2.143.g8cc62
2011 Mar 14
1
[PATCH] virtio_pci: Prevent double-free of pci regions after device hot-unplug
...device *_d)
{
- struct virtio_device *dev = container_of(_d, struct virtio_device, dev);
+ struct virtio_device *dev = container_of(_d, struct virtio_device,
+ dev);
struct virtio_pci_device *vp_dev = to_vp_device(dev);
- struct pci_dev *pci_dev = vp_dev->pci_dev;
- vp_del_vqs(dev);
- pci_set_drvdata(pci_dev, NULL);
- pci_iounmap(pci_dev, vp_dev->ioaddr);
- pci_release_regions(pci_dev);
- pci_disable_device(pci_dev);
kfree(vp_dev);
}
@@ -681,6 +676,12 @@ static void __devexit virtio_pci_remove(struct pci_dev *pci_dev)
struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev);
un...
2011 Mar 14
1
[PATCH] virtio_pci: Prevent double-free of pci regions after device hot-unplug
...device *_d)
{
- struct virtio_device *dev = container_of(_d, struct virtio_device, dev);
+ struct virtio_device *dev = container_of(_d, struct virtio_device,
+ dev);
struct virtio_pci_device *vp_dev = to_vp_device(dev);
- struct pci_dev *pci_dev = vp_dev->pci_dev;
- vp_del_vqs(dev);
- pci_set_drvdata(pci_dev, NULL);
- pci_iounmap(pci_dev, vp_dev->ioaddr);
- pci_release_regions(pci_dev);
- pci_disable_device(pci_dev);
kfree(vp_dev);
}
@@ -681,6 +676,12 @@ static void __devexit virtio_pci_remove(struct pci_dev *pci_dev)
struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev);
un...
2020 Mar 02
1
[PATCH 07/51] drm/qxl: Use drmm_add_final_kfree
.../qxl_kms.c
@@ -27,6 +27,7 @@
#include <linux/pci.h>
#include <drm/drm_drv.h>
+#include <drm/drm_managed.h>
#include <drm/drm_probe_helper.h>
#include "qxl_drv.h"
@@ -121,6 +122,7 @@ int qxl_device_init(struct qxl_device *qdev,
qdev->ddev.pdev = pdev;
pci_set_drvdata(pdev, &qdev->ddev);
qdev->ddev.dev_private = qdev;
+ drmm_add_final_kfree(&qdev->ddev, qdev);
mutex_init(&qdev->gem.mutex);
mutex_init(&qdev->update_area_mutex);
--
2.24.1
2020 Dec 01
1
[PATCH v2 04/20] drm/bochs: Remove references to struct drm_device.pdev
...hs/bochs_drv.c b/drivers/gpu/drm/bochs/bochs_drv.c
index fd454225fd19..b469624fe40d 100644
--- a/drivers/gpu/drm/bochs/bochs_drv.c
+++ b/drivers/gpu/drm/bochs/bochs_drv.c
@@ -121,7 +121,6 @@ static int bochs_pci_probe(struct pci_dev *pdev,
if (ret)
goto err_free_dev;
- dev->pdev = pdev;
pci_set_drvdata(pdev, dev);
ret = bochs_load(dev);
diff --git a/drivers/gpu/drm/bochs/bochs_hw.c b/drivers/gpu/drm/bochs/bochs_hw.c
index dce4672e3fc8..2d7380a9890e 100644
--- a/drivers/gpu/drm/bochs/bochs_hw.c
+++ b/drivers/gpu/drm/bochs/bochs_hw.c
@@ -110,7 +110,7 @@ int bochs_hw_load_edid(struct bochs_devic...
2010 Mar 25
2
[PATCH v3 1/1] Shared memory uio_pci driver
...ERN_INFO "MSI-X enabled\n");
> + info->irq = -1;
> + }
> +
> + info->name = "ivshmem";
> + info->version = "0.0.1";
> +
> + if (uio_register_device(&dev->dev, info))
> + goto out_unmap2;
> +
> + pci_set_drvdata(dev, info);
> +
> +
> + return 0;
> +out_unmap2:
> + iounmap(info->mem[2].internal_addr);
> +out_unmap:
> + iounmap(info->mem[0].internal_addr);
> +out_release:
> + pci_release_regions(dev);
> +out_disable:
> + pci_disable_device(dev);
> +out...
2010 Mar 25
2
[PATCH v3 1/1] Shared memory uio_pci driver
...ERN_INFO "MSI-X enabled\n");
> + info->irq = -1;
> + }
> +
> + info->name = "ivshmem";
> + info->version = "0.0.1";
> +
> + if (uio_register_device(&dev->dev, info))
> + goto out_unmap2;
> +
> + pci_set_drvdata(dev, info);
> +
> +
> + return 0;
> +out_unmap2:
> + iounmap(info->mem[2].internal_addr);
> +out_unmap:
> + iounmap(info->mem[0].internal_addr);
> +out_release:
> + pci_release_regions(dev);
> +out_disable:
> + pci_disable_device(dev);
> +out...
2020 Apr 15
2
[PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc
...int qxl_device_init(struct qxl_device *qdev,
- struct drm_driver *drv,
struct pci_dev *pdev)
{
int r, sb;
- r = drm_dev_init(&qdev->ddev, drv, &pdev->dev);
- if (r) {
- pr_err("Unable to init drm dev");
- goto error;
- }
-
qdev->ddev.pdev = pdev;
pci_set_drvdata(pdev, &qdev->ddev);
qdev->ddev.dev_private = qdev;
- drmm_add_final_kfree(&qdev->ddev, qdev);
mutex_init(&qdev->gem.mutex);
mutex_init(&qdev->update_area_mutex);
@@ -138,8 +130,7 @@ int qxl_device_init(struct qxl_device *qdev,
qdev->vram_mapping = io_mapp...
2020 Apr 15
2
[PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc
...int qxl_device_init(struct qxl_device *qdev,
- struct drm_driver *drv,
struct pci_dev *pdev)
{
int r, sb;
- r = drm_dev_init(&qdev->ddev, drv, &pdev->dev);
- if (r) {
- pr_err("Unable to init drm dev");
- goto error;
- }
-
qdev->ddev.pdev = pdev;
pci_set_drvdata(pdev, &qdev->ddev);
qdev->ddev.dev_private = qdev;
- drmm_add_final_kfree(&qdev->ddev, qdev);
mutex_init(&qdev->gem.mutex);
mutex_init(&qdev->update_area_mutex);
@@ -138,8 +130,7 @@ int qxl_device_init(struct qxl_device *qdev,
qdev->vram_mapping = io_mapp...
2020 Apr 03
3
[PATCH 30/44] drm/qxl: Use devm_drm_dev_alloc
...int qxl_device_init(struct qxl_device *qdev,
- struct drm_driver *drv,
struct pci_dev *pdev)
{
int r, sb;
- r = drm_dev_init(&qdev->ddev, drv, &pdev->dev);
- if (r) {
- pr_err("Unable to init drm dev");
- goto error;
- }
-
qdev->ddev.pdev = pdev;
pci_set_drvdata(pdev, &qdev->ddev);
qdev->ddev.dev_private = qdev;
- drmm_add_final_kfree(&qdev->ddev, qdev);
mutex_init(&qdev->gem.mutex);
mutex_init(&qdev->update_area_mutex);
@@ -138,8 +130,7 @@ int qxl_device_init(struct qxl_device *qdev,
qdev->vram_mapping = io_mapp...
2020 Apr 03
3
[PATCH 30/44] drm/qxl: Use devm_drm_dev_alloc
...int qxl_device_init(struct qxl_device *qdev,
- struct drm_driver *drv,
struct pci_dev *pdev)
{
int r, sb;
- r = drm_dev_init(&qdev->ddev, drv, &pdev->dev);
- if (r) {
- pr_err("Unable to init drm dev");
- goto error;
- }
-
qdev->ddev.pdev = pdev;
pci_set_drvdata(pdev, &qdev->ddev);
qdev->ddev.dev_private = qdev;
- drmm_add_final_kfree(&qdev->ddev, qdev);
mutex_init(&qdev->gem.mutex);
mutex_init(&qdev->update_area_mutex);
@@ -138,8 +130,7 @@ int qxl_device_init(struct qxl_device *qdev,
qdev->vram_mapping = io_mapp...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 05/13] [Mostly resend] virtio additions
...i_enable_device(pci_dev);
+ if (err)
+ goto out;
+
+ err = pci_request_regions(pci_dev, "virtio-pci");
+ if (err)
+ goto out_enable_device;
+
+ vp_dev->ioaddr = pci_iomap(pci_dev, 0, 0);
+ if (vp_dev->ioaddr == NULL)
+ goto out_req_regions;
+
+ pci_set_drvdata(pci_dev, vp_dev);
+
+ /* we use the subsystem vendor/device id as the virtio vendor/device
+ * id. this allows us to use the same PCI vendor/device id for all
+ * virtio devices and to identify the particular virtio driver by
+ * the subsytem ids */
+ vp_dev->vdev.id.vendor =...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 05/13] [Mostly resend] virtio additions
...i_enable_device(pci_dev);
+ if (err)
+ goto out;
+
+ err = pci_request_regions(pci_dev, "virtio-pci");
+ if (err)
+ goto out_enable_device;
+
+ vp_dev->ioaddr = pci_iomap(pci_dev, 0, 0);
+ if (vp_dev->ioaddr == NULL)
+ goto out_req_regions;
+
+ pci_set_drvdata(pci_dev, vp_dev);
+
+ /* we use the subsystem vendor/device id as the virtio vendor/device
+ * id. this allows us to use the same PCI vendor/device id for all
+ * virtio devices and to identify the particular virtio driver by
+ * the subsytem ids */
+ vp_dev->vdev.id.vendor =...
2020 Apr 28
2
[PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc
...t; > {
> > int r, sb;
> >
> > - r = drm_dev_init(&qdev->ddev, drv, &pdev->dev);
> > - if (r) {
> > - pr_err("Unable to init drm dev");
> > - goto error;
> > - }
> > -
> > qdev->ddev.pdev = pdev;
> > pci_set_drvdata(pdev, &qdev->ddev);
> > qdev->ddev.dev_private = qdev;
> > - drmm_add_final_kfree(&qdev->ddev, qdev);
> >
> > mutex_init(&qdev->gem.mutex);
> > mutex_init(&qdev->update_area_mutex);
> > @@ -138,8 +130,7 @@ int qxl_device_ini...
2020 Apr 28
2
[PATCH 26/59] drm/qxl: Use devm_drm_dev_alloc
...t; > {
> > int r, sb;
> >
> > - r = drm_dev_init(&qdev->ddev, drv, &pdev->dev);
> > - if (r) {
> > - pr_err("Unable to init drm dev");
> > - goto error;
> > - }
> > -
> > qdev->ddev.pdev = pdev;
> > pci_set_drvdata(pdev, &qdev->ddev);
> > qdev->ddev.dev_private = qdev;
> > - drmm_add_final_kfree(&qdev->ddev, qdev);
> >
> > mutex_init(&qdev->gem.mutex);
> > mutex_init(&qdev->update_area_mutex);
> > @@ -138,8 +130,7 @@ int qxl_device_ini...