Skip to contentSkip to conversation

uio_pdrv: set memory mapping name

PATCH In review Manuel Traut 2 participants 2 messages Nov 9, 2012 – Nov 11, 2012 Userspace I/O (UIO)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 uio_pdrv: set memory mapping name

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.

drivers/uio/uio_pdrv_genirq.c +1 -0
index 42202cd..ac988ce 100644
@@ -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;
 	}
 
drivers/uio/uio_pdrv.c +1 -0
index 72d3646..39be9e0 100644
@@ -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;
 	}
 
#1 lore raw
Quoted 2 lines · Manuel Traut

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.

Looks fine to me. I added the driver's authors to Cc.

Quoted 30 lines
drivers/uio/uio_pdrv_genirq.c +1 -0
index 42202cd..ac988ce 100644
@@ -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;
 	}
 
drivers/uio/uio_pdrv.c +1 -0
index 72d3646..39be9e0 100644
@@ -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;
 	}