uio_pdrv: set memory mapping name
authorManuel Traut <manut@linutronix.de>
Fri, 9 Nov 2012 06:06:40 +0000 (07:06 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Nov 2012 01:29:07 +0000 (17:29 -0800)
If uio_pdrv[_genirq] is used, the uio maps have currently no name set.
This patch sets the uio_mem name to the name of the memory resource.

Signed-off-by: Manuel Traut <manut@linutronix.de>
Reported-by: Stefan Staedtler <stefan.staedtler@siemens.com>
Tested-by: Stefan Staedtler <stefan.staedtler@siemens.com>
Signed-off-by: "Hans J. Koch" <hjk@hansjkoch.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/uio/uio_pdrv.c
drivers/uio/uio_pdrv_genirq.c

index 72d3646c73654958a19f99ae4ad00e5be0a46212..39be9e061700ded49d32e7e8ca9c5b2ad2d1590d 100644 (file)
@@ -60,6 +60,7 @@ static int uio_pdrv_probe(struct platform_device *pdev)
                uiomem->memtype = UIO_MEM_PHYS;
                uiomem->addr = r->start;
                uiomem->size = resource_size(r);
+               uiomem->name = r->name;
                ++uiomem;
        }
 
index 42202cd831586940bdf87b2cc04bc8e89c40808b..ac988ce62f2b11a7d89913a912f1e4b2a85dae16 100644 (file)
@@ -172,6 +172,7 @@ static int uio_pdrv_genirq_probe(struct platform_device *pdev)
                uiomem->memtype = UIO_MEM_PHYS;
                uiomem->addr = r->start;
                uiomem->size = resource_size(r);
+               uiomem->name = r->name;
                ++uiomem;
        }