Commit 77186294 authored by Liguang Zhang's avatar Liguang Zhang Committed by Rafael J. Wysocki

ACPI: AMBA: Fix resource name in /proc/iomem

In function amba_handler_attach(), dev->res.name is initialized by
amba_device_alloc. But when address_found is false, dev->res.name is
assigned to null value, which leads to wrong resource name display in
/proc/iomem, "<BAD>" is seen for those resources.
Signed-off-by: default avatarLiguang Zhang <zhangliguang@linux.alibaba.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 5e692824
...@@ -76,6 +76,7 @@ static int amba_handler_attach(struct acpi_device *adev, ...@@ -76,6 +76,7 @@ static int amba_handler_attach(struct acpi_device *adev,
case IORESOURCE_MEM: case IORESOURCE_MEM:
if (!address_found) { if (!address_found) {
dev->res = *rentry->res; dev->res = *rentry->res;
dev->res.name = dev_name(&dev->dev);
address_found = true; address_found = true;
} }
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment