[SPARC]: show device name in /proc/dvma_map
authorMartin Habets <errandir_news@mph.eclipse.co.uk>
Mon, 8 May 2006 06:43:19 +0000 (23:43 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 May 2006 06:43:19 +0000 (23:43 -0700)
This patch will set the device name in a resource, which will be shown
in /proc/dvma_map.

Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/ioport.c

index 460f72e640e6593e37005bc62f5a8af0b46bbdd8..f9ff29734848709b56dfb873d0e530b5aebf79db 100644 (file)
@@ -274,6 +274,11 @@ void *sbus_alloc_consistent(struct sbus_dev *sdev, long len, u32 *dma_addrp)
        if (mmu_map_dma_area(dma_addrp, va, res->start, len_total) != 0)
                goto err_noiommu;
 
+       /* Set the resource name, if known. */
+       if (sdev) {
+               res->name = sdev->prom_name;
+       }
+
        return (void *)res->start;
 
 err_noiommu: