[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210629112748.23734-1-zhangliguang@linux.alibaba.com>
Date: Tue, 29 Jun 2021 19:27:48 +0800
From: Liguang Zhang <zhangliguang@...ux.alibaba.com>
To: "Rafael J. Wysocki" <rjw@...ysocki.net>,
Len Brown <lenb@...nel.org>
Cc: linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
Liguang Zhang <zhangliguang@...ux.alibaba.com>
Subject: [PATCH] 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@...ux.alibaba.com>
---
drivers/acpi/acpi_amba.c | 1 +
1 file changed, 1 insertion(+)
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;
--
2.19.1.6.gb485710b
Powered by blists - more mailing lists