@@ -119,6 +119,7 @@ __devm_ioremap_resource(struct device *dev, const struct resource *res,
{
resource_size_t size;
void __iomem *dest_ptr;
+ char *pretty_name;
BUG_ON(!dev);
@@ -129,7 +130,16 @@ __devm_ioremap_resource(struct device *dev, const struct resource *res,
size = resource_size(res);
- if (!devm_request_mem_region(dev, res->start, size, dev_name(dev))) {
+ if (res->name) {
+ int len = strlen(dev_name(dev)) + strlen(res->name) + 2;
+
+ pretty_name = devm_kzalloc(dev, len, GFP_KERNEL);
+ sprintf(pretty_name, "%s %s", dev_name(dev), res->name);
+ } else {
+ pretty_name = devm_kstrdup(dev, dev_name(dev), GFP_KERNEL);
+ }
+
+ if (!devm_request_mem_region(dev, res->start, size, pretty_name)) {
dev_err(dev, "can't request region for resource %pR\n", res);
return IOMEM_ERR_PTR(-EBUSY);
}