]> git.baikalelectronics.ru Git - kernel.git/commitdiff
PNP / ACPI: avoid garbage in resource name
authorLiu ShuoX <shuox.liu@intel.com>
Tue, 16 Jul 2013 08:23:44 +0000 (16:23 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 17 Jul 2013 23:38:59 +0000 (01:38 +0200)
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: Liu ShuoX <shuox.liu@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/pnp/pnpacpi/rsparser.c
drivers/pnp/resource.c

index 9847ab163829f60d7311c83f3c57a0eb32d767f1..167f3d00c916d2e30a63dcc31d260a45d1e5cada 100644 (file)
@@ -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)
index 3e6db1c1dc295386f01c37bf23679eba86e1cbd7..d95e101ffb439ebec5cc11772305d99578db772d 100644 (file)
@@ -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;
 }