diff options
author | Liguang Zhang <zhangliguang@linux.alibaba.com> | 2021-06-29 19:27:48 +0800 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-06-30 20:01:10 +0200 |
commit | 7718629432676b5ebd9a32940782fe297a0abf8d (patch) | |
tree | dd6a10e93be56087c102c7594d357ba9f41024a6 /drivers/acpi/acpi_amba.c | |
parent | 5e6928249b81b4d8727ab6a4037a171d15455cb0 (diff) |
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: Liguang Zhang <zhangliguang@linux.alibaba.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpi_amba.c')
-rw-r--r-- | drivers/acpi/acpi_amba.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/acpi/acpi_amba.c b/drivers/acpi/acpi_amba.c index 49b781a9cd97..ab8a4e0191b1 100644 --- a/drivers/acpi/acpi_amba.c +++ b/drivers/acpi/acpi_amba.c @@ -76,6 +76,7 @@ static int amba_handler_attach(struct acpi_device *adev, case IORESOURCE_MEM: if (!address_found) { dev->res = *rentry->res; + dev->res.name = dev_name(&dev->dev); address_found = true; } break; |