search for: dev_set_drvdata

Displaying 20 results from an estimated 186 matches for "dev_set_drvdata".

Did you mean: dev_get_drvdata
2013 Dec 13
0
[PATCH v4 RFC 1/3] virtio_ccw: fix vcdev pointer handling issues
...virtio_grab_drvdata(struct ccw_device *cdev) +{ + unsigned long flags; + struct virtio_ccw_device *vcdev; + + spin_lock_irqsave(get_ccwdev_lock(cdev), flags); + vcdev = dev_get_drvdata(&cdev->dev); + if (!vcdev) { + spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags); + return NULL; + } + dev_set_drvdata(&cdev->dev, NULL); + spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags); + return vcdev; +} + static void virtio_ccw_remove(struct ccw_device *cdev) { - struct virtio_ccw_device *vcdev = dev_get_drvdata(&cdev->dev); + struct virtio_ccw_device *vcdev = virtio_grab_drvdata(cdev);...
2009 May 11
1
[PATCH] xen/blkfront: remove driver_data direct access of struct device
To avoid direct access to the driver_data pointer in struct device, the functions dev_get_drvdata() and dev_set_drvdata() should be used. Signed-off-by: Roel Kluin <roel.kluin at gmail.com> --- diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 8f90508..ff09809 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -755,12 +755,12 @@ static int blkfront_pro...
2009 May 11
1
[PATCH] xen/blkfront: remove driver_data direct access of struct device
To avoid direct access to the driver_data pointer in struct device, the functions dev_get_drvdata() and dev_set_drvdata() should be used. Signed-off-by: Roel Kluin <roel.kluin at gmail.com> --- diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 8f90508..ff09809 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -755,12 +755,12 @@ static int blkfront_pro...
2009 May 11
1
[PATCH] xen/blkfront: remove driver_data direct access of struct device
To avoid direct access to the driver_data pointer in struct device, the functions dev_get_drvdata() and dev_set_drvdata() should be used. Signed-off-by: Roel Kluin <roel.kluin at gmail.com> --- diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 8f90508..ff09809 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -755,12 +755,12 @@ static int blkfront_pro...
2014 Apr 25
0
[PATCH 1/1] virtio_ccw: introduce device_lost in virtio_ccw_device
...*vcdev = virtio_grab_drvdata(cdev); - if (vcdev && cdev->online) + if (vcdev && cdev->online) { + if (vcdev->device_lost) + virtio_break_device(&vcdev->vdev); unregister_virtio_device(&vcdev->vdev); - spin_lock_irqsave(get_ccwdev_lock(cdev), flags); - dev_set_drvdata(&cdev->dev, NULL); - spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags); + spin_lock_irqsave(get_ccwdev_lock(cdev), flags); + dev_set_drvdata(&cdev->dev, NULL); + spin_unlock_irqrestore(get_ccwdev_lock(cdev), flags); + } cdev->handler = NULL; } @@ -1023,12 +1028,14 @@ sta...
2014 Apr 25
2
[PATCH 0/1] virtio_ccw: exploit virtio_break_device()
Rusty, this patch exploits the new function virtio_break_device() as of your patch set dated January 15th on linux-kernel at vger.kernel.org. The patch avoids hang situations during device unregister, when a (block) device with active IO is hot-unplugged. Heinz Graalfs (1): virtio_ccw: introduce device_lost in virtio_ccw_device drivers/s390/kvm/virtio_ccw.c | 49
2014 Apr 25
2
[PATCH 0/1] virtio_ccw: exploit virtio_break_device()
Rusty, this patch exploits the new function virtio_break_device() as of your patch set dated January 15th on linux-kernel at vger.kernel.org. The patch avoids hang situations during device unregister, when a (block) device with active IO is hot-unplugged. Heinz Graalfs (1): virtio_ccw: introduce device_lost in virtio_ccw_device drivers/s390/kvm/virtio_ccw.c | 49
2009 Jun 16
0
[PATCH 49/64] xen block: remove driver_data direct access of struct device
In the near future, the driver core is going to not allow direct access to the driver_data pointer in struct device. Instead, the functions dev_get_drvdata() and dev_set_drvdata() should be used. These functions have been around since the beginning, so are backwards compatible with all older kernel versions. Cc: xen-devel at lists.xensource.com Cc: virtualization at lists.osdl.org Acked-by: Chris Wright <chrisw at sous-sol.org> Acked-by: Jeremy Fitzhardinge <je...
2009 Jun 16
0
[PATCH 49/64] xen block: remove driver_data direct access of struct device
In the near future, the driver core is going to not allow direct access to the driver_data pointer in struct device. Instead, the functions dev_get_drvdata() and dev_set_drvdata() should be used. These functions have been around since the beginning, so are backwards compatible with all older kernel versions. Cc: xen-devel at lists.xensource.com Cc: virtualization at lists.osdl.org Acked-by: Chris Wright <chrisw at sous-sol.org> Acked-by: Jeremy Fitzhardinge <je...
2009 Jun 16
0
[PATCH 49/64] xen block: remove driver_data direct access of struct device
In the near future, the driver core is going to not allow direct access to the driver_data pointer in struct device. Instead, the functions dev_get_drvdata() and dev_set_drvdata() should be used. These functions have been around since the beginning, so are backwards compatible with all older kernel versions. Cc: xen-devel at lists.xensource.com Cc: virtualization at lists.osdl.org Acked-by: Chris Wright <chrisw at sous-sol.org> Acked-by: Jeremy Fitzhardinge <je...
2011 Apr 29
17
[RESEND] [PATCH 00/18] Staging: hv: Cleanup vmbus driver code
This is a resend of the patches yet to be applied. This patch-set addresses some of the bus/driver model cleanup that Greg sugested over the last couple of days. In this patch-set we deal with the following issues: 1) Cleanup error handling in the vmbus_probe() and vmbus_child_device_register() functions. Fixed a bug in the probe failure path as part of this cleanup. 2) The Windows
2011 Apr 29
17
[RESEND] [PATCH 00/18] Staging: hv: Cleanup vmbus driver code
This is a resend of the patches yet to be applied. This patch-set addresses some of the bus/driver model cleanup that Greg sugested over the last couple of days. In this patch-set we deal with the following issues: 1) Cleanup error handling in the vmbus_probe() and vmbus_child_device_register() functions. Fixed a bug in the probe failure path as part of this cleanup. 2) The Windows
2019 May 15
5
[PATCH v9 2/7] virtio-pmem: Add virtio pmem driver
...gt; + vpmem->nvdimm_bus = nvdimm_bus_register(&vdev->dev, > + &vpmem->nd_desc); > + if (!vpmem->nvdimm_bus) { > + dev_err(&vdev->dev, "failed to register device with nvdimm_bus\n"); > + err = -ENXIO; > + goto out_vq; > + } > + > + dev_set_drvdata(&vdev->dev, vpmem->nvdimm_bus); > + > + ndr_desc.res = &res; > + ndr_desc.numa_node = nid; > + ndr_desc.flush = async_pmem_flush; > + set_bit(ND_REGION_PAGEMAP, &ndr_desc.flags); > + set_bit(ND_REGION_ASYNC, &ndr_desc.flags); > + nd_region = nvdimm_pmem_re...
2019 May 15
5
[PATCH v9 2/7] virtio-pmem: Add virtio pmem driver
...gt; + vpmem->nvdimm_bus = nvdimm_bus_register(&vdev->dev, > + &vpmem->nd_desc); > + if (!vpmem->nvdimm_bus) { > + dev_err(&vdev->dev, "failed to register device with nvdimm_bus\n"); > + err = -ENXIO; > + goto out_vq; > + } > + > + dev_set_drvdata(&vdev->dev, vpmem->nvdimm_bus); > + > + ndr_desc.res = &res; > + ndr_desc.numa_node = nid; > + ndr_desc.flush = async_pmem_flush; > + set_bit(ND_REGION_PAGEMAP, &ndr_desc.flags); > + set_bit(ND_REGION_ASYNC, &ndr_desc.flags); > + nd_region = nvdimm_pmem_re...
2011 Apr 05
3
[PATCH] staging: hv: Fix GARP not sent after Quick Migration
...v_ctx->device_ctx->device); + netif_notify_peers(net); +} + + static int netvsc_probe(struct device *device) { struct hv_driver *drv = @@ -353,6 +367,7 @@ static int netvsc_probe(struct device *device) net_device_ctx->device_ctx = device_obj; net_device_ctx->avail = ring_size; dev_set_drvdata(device, net); + INIT_WORK(&net_device_ctx->work, netvsc_send_garp); /* Notify the netvsc driver of the new device */ ret = net_drv_obj->base.dev_add(device_obj, &device_info); -- 1.6.3.2
2011 Apr 05
3
[PATCH] staging: hv: Fix GARP not sent after Quick Migration
...v_ctx->device_ctx->device); + netif_notify_peers(net); +} + + static int netvsc_probe(struct device *device) { struct hv_driver *drv = @@ -353,6 +367,7 @@ static int netvsc_probe(struct device *device) net_device_ctx->device_ctx = device_obj; net_device_ctx->avail = ring_size; dev_set_drvdata(device, net); + INIT_WORK(&net_device_ctx->work, netvsc_send_garp); /* Notify the netvsc driver of the new device */ ret = net_drv_obj->base.dev_add(device_obj, &device_info); -- 1.6.3.2
2011 Apr 26
29
[PATCH 00/25] Staging: hv: Cleanup vmbus driver code
This patch-set addresses some of the bus/driver model cleanup that Greg sugested over the last couple of days. In this patch-set we deal with the following issues: 1) Cleanup unnecessary state in struct hv_device and struct hv_driver to be compliant with the Linux Driver model. 2) Cleanup the vmbus_match() function to conform with the Linux Driver model. 3) Cleanup error
2011 Apr 26
29
[PATCH 00/25] Staging: hv: Cleanup vmbus driver code
This patch-set addresses some of the bus/driver model cleanup that Greg sugested over the last couple of days. In this patch-set we deal with the following issues: 1) Cleanup unnecessary state in struct hv_device and struct hv_driver to be compliant with the Linux Driver model. 2) Cleanup the vmbus_match() function to conform with the Linux Driver model. 3) Cleanup error
2009 Apr 30
3
[PATCH] xen block: remove driver_data direct access of struct device
From: Greg Kroah-Hartman <gregkh at suse.de> In the near future, the driver core is going to not allow direct access to the driver_data pointer in struct device. Instead, the functions dev_get_drvdata() and dev_set_drvdata() should be used. These functions have been around since the beginning, so are backwards compatible with all older kernel versions. Cc: xen-devel at lists.xensource.com Cc: virtualization at lists.osdl.org Cc: Chris Wright <chrisw at sous-sol.org> Cc: Jeremy Fitzhardinge <jeremy at xens...
2009 Apr 30
3
[PATCH] xen block: remove driver_data direct access of struct device
From: Greg Kroah-Hartman <gregkh at suse.de> In the near future, the driver core is going to not allow direct access to the driver_data pointer in struct device. Instead, the functions dev_get_drvdata() and dev_set_drvdata() should be used. These functions have been around since the beginning, so are backwards compatible with all older kernel versions. Cc: xen-devel at lists.xensource.com Cc: virtualization at lists.osdl.org Cc: Chris Wright <chrisw at sous-sol.org> Cc: Jeremy Fitzhardinge <jeremy at xens...