Displaying 20 results from an estimated 77 matches for "platform_get_drvdata".
2014 Aug 12
3
[PATCH] gk20a: add LTC device
LTC device is now required for PGRAPH to work, add it.
Signed-off-by: Alexandre Courbot <acourbot at nvidia.com>
---
nvkm/engine/device/nve0.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/nvkm/engine/device/nve0.c b/nvkm/engine/device/nve0.c
index 54ec53bc6252..cdf9147f32a1 100644
--- a/nvkm/engine/device/nve0.c
+++ b/nvkm/engine/device/nve0.c
@@ -163,6 +163,7 @@
2016 Aug 30
1
[PATCH v8 05/18] dmaengine: st_fdma: Add STMicroelectronics FDMA engine driver support
...s[i];
> +
> + fchan->fdev = fdev;
> + fchan->vchan.desc_free = st_fdma_free_desc;
> + vchan_init(&fchan->vchan, &fdev->dma_device);
this initialized a tasklet
> +static int st_fdma_remove(struct platform_device *pdev)
> +{
> + struct st_fdma_dev *fdev = platform_get_drvdata(pdev);
> +
> + devm_free_irq(&pdev->dev, fdev->irq, fdev);
> + st_slim_rproc_put(fdev->slim_rproc);
> + of_dma_controller_free(pdev->dev.of_node);
> + dma_async_device_unregister(&fdev->dma_device);
and that vchan tasklet is not quisced here :(
> +MODULE_L...
2016 Aug 30
1
[PATCH v8 05/18] dmaengine: st_fdma: Add STMicroelectronics FDMA engine driver support
...s[i];
> +
> + fchan->fdev = fdev;
> + fchan->vchan.desc_free = st_fdma_free_desc;
> + vchan_init(&fchan->vchan, &fdev->dma_device);
this initialized a tasklet
> +static int st_fdma_remove(struct platform_device *pdev)
> +{
> + struct st_fdma_dev *fdev = platform_get_drvdata(pdev);
> +
> + devm_free_irq(&pdev->dev, fdev->irq, fdev);
> + st_slim_rproc_put(fdev->slim_rproc);
> + of_dma_controller_free(pdev->dev.of_node);
> + dma_async_device_unregister(&fdev->dma_device);
and that vchan tasklet is not quisced here :(
> +MODULE_L...
2014 Oct 25
0
[RFC PATCH 1/2] Add a new register offset let interrupt reason available
...(&vm_dev->vdev);
+ err = register_virtio_device(&vm_dev->vdev);
+ if (err) {
+ free_pages_exact(vm_dev->isr_mem, PAGE_SIZE);
+ vm_dev->isr_mem = NULL;
+ }
+
+ return err;
}
static int virtio_mmio_remove(struct platform_device *pdev)
{
struct virtio_mmio_device *vm_dev = platform_get_drvdata(pdev);
+ free_pages_exact(vm_dev->isr_mem, PAGE_SIZE);
unregister_virtio_device(&vm_dev->vdev);
return 0;
diff --git a/include/linux/virtio_mmio.h b/include/linux/virtio_mmio.h
index 5c7b6f0..b1e3ec7 100644
--- a/include/linux/virtio_mmio.h
+++ b/include/linux/virtio_mmio.h
@@ -95...
2014 Dec 19
5
[RFC] virtio-mmio: Update the device to OASIS spec version
...@@ static const struct virtio_config_ops virtio_mmio_config_ops = {
/* Platform device */
+static ssize_t vm_dev_attr_version_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ struct platform_device *pdev = to_platform_device(dev);
+ struct virtio_mmio_device *vm_dev = platform_get_drvdata(pdev);
+
+ return snprintf(buf, PAGE_SIZE, "%lu", vm_dev->version);
+}
+
+static struct device_attribute vm_dev_attr_version =
+ __ATTR(version, S_IRUGO, vm_dev_attr_version_show, NULL);
+
static int virtio_mmio_probe(struct platform_device *pdev)
{
struct virtio_mmio_device *vm_d...
2014 Dec 19
5
[RFC] virtio-mmio: Update the device to OASIS spec version
...@@ static const struct virtio_config_ops virtio_mmio_config_ops = {
/* Platform device */
+static ssize_t vm_dev_attr_version_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ struct platform_device *pdev = to_platform_device(dev);
+ struct virtio_mmio_device *vm_dev = platform_get_drvdata(pdev);
+
+ return snprintf(buf, PAGE_SIZE, "%lu", vm_dev->version);
+}
+
+static struct device_attribute vm_dev_attr_version =
+ __ATTR(version, S_IRUGO, vm_dev_attr_version_show, NULL);
+
static int virtio_mmio_probe(struct platform_device *pdev)
{
struct virtio_mmio_device *vm_d...
2020 Mar 10
15
[PATCH 00/15 v2] iommu: Move iommu_fwspec out of 'struct device'
Hi,
here is a patch-set to rename iommu_param to dev_iommu and
establish it as a struct for generic per-device iommu-data.
Also move the iommu_fwspec pointer from struct device into
dev_iommu to have less iommu-related pointers in struct
device.
The bigger part of this patch-set moves the iommu_priv
pointer from struct iommu_fwspec to dev_iommu, making is
usable for iommu-drivers which do not
2015 Jan 15
3
[RFC] virtio-mmio: Update the device to OASIS spec version
...t though this problem
thoroughly. If you can volunteer an example of things going on, it would
be useful. Either way, I'll think about it again.
> @@ -496,7 +531,8 @@ static int virtio_mmio_remove(struct platform_device *pdev)
> > {
> > struct virtio_mmio_device *vm_dev = platform_get_drvdata(pdev);
> >
> > - unregister_virtio_device(&vm_dev->vdev);
> > + if (vm_dev)
> > + unregister_virtio_device(&vm_dev->vdev);
> >
>
> Will remove ever be called if probe fails?
No.
> > -/* Guest's memory page size in by...
2015 Jan 15
3
[RFC] virtio-mmio: Update the device to OASIS spec version
...t though this problem
thoroughly. If you can volunteer an example of things going on, it would
be useful. Either way, I'll think about it again.
> @@ -496,7 +531,8 @@ static int virtio_mmio_remove(struct platform_device *pdev)
> > {
> > struct virtio_mmio_device *vm_dev = platform_get_drvdata(pdev);
> >
> > - unregister_virtio_device(&vm_dev->vdev);
> > + if (vm_dev)
> > + unregister_virtio_device(&vm_dev->vdev);
> >
>
> Will remove ever be called if probe fails?
No.
> > -/* Guest's memory page size in by...
2015 Jan 15
2
[RFC] virtio-mmio: Update the device to OASIS spec version
...No example yet - I forgot to code this up for virtio pci. I'll copy you
> on patch.
Ok, will have a look.
> > > @@ -496,7 +531,8 @@ static int virtio_mmio_remove(struct platform_device *pdev)
> > > > {
> > > > struct virtio_mmio_device *vm_dev = platform_get_drvdata(pdev);
> > > >
> > > > - unregister_virtio_device(&vm_dev->vdev);
> > > > + if (vm_dev)
> > > > + unregister_virtio_device(&vm_dev->vdev);
> > > >
> > >
> > > Will remove ever be called...
2015 Jan 15
2
[RFC] virtio-mmio: Update the device to OASIS spec version
...No example yet - I forgot to code this up for virtio pci. I'll copy you
> on patch.
Ok, will have a look.
> > > @@ -496,7 +531,8 @@ static int virtio_mmio_remove(struct platform_device *pdev)
> > > > {
> > > > struct virtio_mmio_device *vm_dev = platform_get_drvdata(pdev);
> > > >
> > > > - unregister_virtio_device(&vm_dev->vdev);
> > > > + if (vm_dev)
> > > > + unregister_virtio_device(&vm_dev->vdev);
> > > >
> > >
> > > Will remove ever be called...
2014 Dec 24
2
[PATCH nouveau 06/11] platform: complete the power up/down sequence
..._parse_phandle_with_fixed_args(dev->of_node, "mc",
> + 1, 0, &args);
> + if (ret)
> + return ret;
> +
> + pdev = of_find_device_by_node(args.np);
> + if (!pdev)
> + return -EINVAL;
This is wrong, you need to handle -EPROBE_DEFER here.
> +
> + *mc = platform_get_drvdata(pdev);
> + if (!*mc)
> + return -EINVAL;
> +
> + *swgroup = args.args[0];
> +
> + return 0;
> +}
> +
> static int nouveau_platform_probe(struct platform_device *pdev)
> {
> struct nouveau_platform_gpu *gpu;
> @@ -118,6 +156,10 @@ static int nouveau_platform_...
2015 Jan 15
2
[RFC] virtio-mmio: Update the device to OASIS spec version
...s - there will be a device, but no driver will drive it.
A device with an *illegal* ID.
> > > > > @@ -496,7 +531,8 @@ static int virtio_mmio_remove(struct platform_device *pdev)
> > > > > > {
> > > > > > struct virtio_mmio_device *vm_dev = platform_get_drvdata(pdev);
> > > > > >
> > > > > > - unregister_virtio_device(&vm_dev->vdev);
> > > > > > + if (vm_dev)
> > > > > > + unregister_virtio_device(&vm_dev->vdev);
> > > > > >
> >...
2015 Jan 15
2
[RFC] virtio-mmio: Update the device to OASIS spec version
...s - there will be a device, but no driver will drive it.
A device with an *illegal* ID.
> > > > > @@ -496,7 +531,8 @@ static int virtio_mmio_remove(struct platform_device *pdev)
> > > > > > {
> > > > > > struct virtio_mmio_device *vm_dev = platform_get_drvdata(pdev);
> > > > > >
> > > > > > - unregister_virtio_device(&vm_dev->vdev);
> > > > > > + if (vm_dev)
> > > > > > + unregister_virtio_device(&vm_dev->vdev);
> > > > > >
> >...
2014 Dec 23
18
[PATCH 0/11] Add suspend/resume support for GK20A
Hi,
This series includes some pieces of fixes to complete the GK20A power
on/off sequences and add the suspend/resume support.
The patches 1/11 - 4/11 are based on the linux-next-20141219.
The patches 5/11 - 11/11 are based on the branch "linux-3.19" of Ben Skeggs's
tree (http://cgit.freedesktop.org/~darktama/nouveau).
Thanks,
Vince
Vince Hsu (4): (linux-next-20141219)
ARM:
2017 Dec 05
0
[PATCH v2 2/2] virtio_mmio: add cleanup for virtio_mmio_remove
...tio/virtio_mmio.c
index f984510..5e2ca34 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -599,8 +599,15 @@ static int virtio_mmio_probe(struct platform_device *pdev)
static int virtio_mmio_remove(struct platform_device *pdev)
{
struct virtio_mmio_device *vm_dev = platform_get_drvdata(pdev);
+ struct resource *mem;
unregister_virtio_device(&vm_dev->vdev);
+ iounmap(vm_dev->base);
+ mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (mem)
+ devm_release_mem_region(&pdev->dev, mem->start,
+ resource_size(mem));
+ devm_kfree(&pdev->dev, vm_...
2017 Dec 06
0
[PATCH v3 2/2] virtio_mmio: add cleanup for virtio_mmio_remove
...tio/virtio_mmio.c
index ec40104..a9192fe 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -610,7 +610,13 @@ static int virtio_mmio_probe(struct platform_device *pdev)
static int virtio_mmio_remove(struct platform_device *pdev)
{
struct virtio_mmio_device *vm_dev = platform_get_drvdata(pdev);
+ struct resource *mem;
+ iounmap(vm_dev->base);
+ mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (mem)
+ devm_release_mem_region(&pdev->dev, mem->start,
+ resource_size(mem));
unregister_virtio_device(&vm_dev->vdev);
return 0;
--
2.9.4
2023 May 07
0
[PATCH 33/53] drm/nouveau: Convert to platform remove callback returning void
.../gpu/drm/nouveau/nouveau_platform.c
@@ -43,11 +43,10 @@ static int nouveau_platform_probe(struct platform_device *pdev)
return 0;
}
-static int nouveau_platform_remove(struct platform_device *pdev)
+static void nouveau_platform_remove(struct platform_device *pdev)
{
struct drm_device *dev = platform_get_drvdata(pdev);
nouveau_drm_device_remove(dev);
- return 0;
}
#if IS_ENABLED(CONFIG_OF)
@@ -93,5 +92,5 @@ struct platform_driver nouveau_platform_driver = {
.of_match_table = of_match_ptr(nouveau_platform_match),
},
.probe = nouveau_platform_probe,
- .remove = nouveau_platform_remove,
+ .remove...
2014 Aug 12
0
[PATCH] platform: fix compilation error
...tion(-)
diff --git a/drm/nouveau_platform.c b/drm/nouveau_platform.c
index 0ffeb50d0088..246a824c16ca 100644
--- a/drm/nouveau_platform.c
+++ b/drm/nouveau_platform.c
@@ -149,7 +149,8 @@ power_down:
static int nouveau_platform_remove(struct platform_device *pdev)
{
struct drm_device *drm_dev = platform_get_drvdata(pdev);
- struct nouveau_device *device = nouveau_dev(drm_dev);
+ struct nouveau_drm *drm = nouveau_drm(drm_dev);
+ struct nouveau_device *device = nvkm_device(&drm->device);
struct nouveau_platform_gpu *gpu = nv_device_to_platform(device)->gpu;
nouveau_drm_device_remove(drm_dev);
--...
2014 Dec 23
0
[PATCH nouveau 06/11] platform: complete the power up/down sequence
...t *swgroup)
+{
+ struct of_phandle_args args;
+ struct platform_device *pdev;
+ int ret;
+
+ ret = of_parse_phandle_with_fixed_args(dev->of_node, "mc",
+ 1, 0, &args);
+ if (ret)
+ return ret;
+
+ pdev = of_find_device_by_node(args.np);
+ if (!pdev)
+ return -EINVAL;
+
+ *mc = platform_get_drvdata(pdev);
+ if (!*mc)
+ return -EINVAL;
+
+ *swgroup = args.args[0];
+
+ return 0;
+}
+
static int nouveau_platform_probe(struct platform_device *pdev)
{
struct nouveau_platform_gpu *gpu;
@@ -118,6 +156,10 @@ static int nouveau_platform_probe(struct platform_device *pdev)
if (IS_ERR(gpu->clk...