Commit 3c0fc071 authored by Liu ShuoX's avatar Liu ShuoX Committed by Rafael J. Wysocki

PNP / ACPI: avoid garbage in resource name

Set temporary variable as 0 to avoid garbage string output from
/proc/iomem after register resources and reset to PNP dev name
later.
Signed-off-by: default avatarLiu ShuoX <shuox.liu@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent d19f503e
...@@ -180,7 +180,7 @@ static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res, ...@@ -180,7 +180,7 @@ static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res,
struct pnp_dev *dev = data; struct pnp_dev *dev = data;
struct acpi_resource_dma *dma; struct acpi_resource_dma *dma;
struct acpi_resource_vendor_typed *vendor_typed; struct acpi_resource_vendor_typed *vendor_typed;
struct resource r; struct resource r = {0};
int i, flags; int i, flags;
if (acpi_dev_resource_memory(res, &r) if (acpi_dev_resource_memory(res, &r)
......
...@@ -515,6 +515,7 @@ struct pnp_resource *pnp_add_resource(struct pnp_dev *dev, ...@@ -515,6 +515,7 @@ struct pnp_resource *pnp_add_resource(struct pnp_dev *dev,
} }
pnp_res->res = *res; pnp_res->res = *res;
pnp_res->res.name = dev->name;
dev_dbg(&dev->dev, "%pR\n", res); dev_dbg(&dev->dev, "%pR\n", res);
return pnp_res; return pnp_res;
} }
......
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