Messages in this thread Patch in this message | | | Subject | RE: Problem with /proc/iomem on ARM | Date | Wed, 1 Jul 2009 14:24:52 -0400 | From | "H Hartley Sweeten" <> |
| |
On Wednesday, July 01, 2009 11:13 AM, Kay Sievers wrote: >> The serial ports on my system are amba bus devices. >> >>> After all, it seems like this should be fixed in arm somewhere, not to >>> copy and store internal driver core pointers, but use the device >>> itself to retrieve the values. >> >> Maybe the problem is in drivers/amba/bus.c? amba_device_register() does: >> >> dev->res.name = dev_name(&dev->dev); > > Looks like. If you get the name directly from dev->init_name. Does that work? >
The following patch does fix /proc/iomem for the amba uarts on my system. Is this the correct approach to fixing the issue?
Regards, Hartley
---
amba: set resource init_name
Noticed on ep93xx ARM system, /proc/iomem is missing the names for amba bus devices.
I appears that drivers/amba/bus.c does not set the kobject to allow dev_name() to return the device name. Just use the init_name directly.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
---
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index 3d763fd..9bfb9f7 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c @@ -210,7 +210,7 @@ int amba_device_register(struct amba_device *dev, struct resource *parent) dev->dev.release = amba_device_release; dev->dev.bus = &amba_bustype; dev->dev.dma_mask = &dev->dma_mask; - dev->res.name = dev_name(&dev->dev); + dev->res.name = dev->dev.init_name; if (!dev->dev.coherent_dma_mask && dev->dma_mask) dev_warn(&dev->dev, "coherent dma mask is unset\n"); | |