linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pnp: avoid inaccurate resource name
@ 2013-07-16  8:23 shuox.liu
  0 siblings, 0 replies; only message in thread
From: shuox.liu @ 2013-07-16  8:23 UTC (permalink / raw)
  To: linux-kernel, linux-acpi; +Cc: bhelgaas, rjw, lenb, yanmin_zhang

From: Liu ShuoX <shuox.liu@intel.com>

Set temporary variable as 0 to avoid garbage string output from
/proc/iomem after register resources, and reset to pnp dev name.

Signed-off-by: Liu ShuoX <shuox.liu@intel.com>
---
 drivers/pnp/pnpacpi/rsparser.c | 2 +-
 drivers/pnp/resource.c         | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c
index 9847ab1..167f3d0 100644
--- a/drivers/pnp/pnpacpi/rsparser.c
+++ b/drivers/pnp/pnpacpi/rsparser.c
@@ -180,7 +180,7 @@ static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res,
 	struct pnp_dev *dev = data;
 	struct acpi_resource_dma *dma;
 	struct acpi_resource_vendor_typed *vendor_typed;
-	struct resource r;
+	struct resource r = {0};
 	int i, flags;
 
 	if (acpi_dev_resource_memory(res, &r)
diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c
index 3e6db1c..d95e101 100644
--- a/drivers/pnp/resource.c
+++ b/drivers/pnp/resource.c
@@ -515,6 +515,7 @@ struct pnp_resource *pnp_add_resource(struct pnp_dev *dev,
 	}
 
 	pnp_res->res = *res;
+	pnp_res->res.name = dev->name;
 	dev_dbg(&dev->dev, "%pR\n", res);
 	return pnp_res;
 }
-- 
1.8.3

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-07-16  8:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-16  8:23 [PATCH] pnp: avoid inaccurate resource name shuox.liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).