[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6ffb74421dace254700dc2ee72d908dd7327bec1.1375867291.git.rubini@gnudd.com>
Date: Wed, 7 Aug 2013 12:17:47 +0200
From: Davide Ciminaghi <ciminaghi@...dd.com>
To: linux-kernel@...r.kernel.org
Cc: rubini@...dd.com, Giancarlo Asnaghi <giancarlo.asnaghi@...com>,
x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>,
Ingo Molnar <mingo@...hat.com>,
Russell King <linux@....linux.org.uk>,
Thomas Gleixner <tglx@...utronix.de>,
devicetree@...r.kernel.org
Subject: [PATCH 08/26] OF platform, of_amba_device_create(): add parent
resource to parameters.
This is needed when creating pci-amba devices: an amba device's
resource shall be child of the corresponding pci device's resource.
Signed-off-by: Davide Ciminaghi <ciminaghi@...dd.com>
Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@...com>
---
drivers/of/platform.c | 11 +++++++----
include/linux/of_platform.h | 3 ++-
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 57c6bbe..bf75aaa 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -252,7 +252,8 @@ EXPORT_SYMBOL(of_platform_device_create);
struct amba_device *of_amba_device_create(struct device_node *node,
const char *bus_id,
void *platform_data,
- struct device *parent)
+ struct device *parent,
+ struct resource *parent_resource)
{
struct amba_device *dev;
const void *prop;
@@ -293,7 +294,7 @@ struct amba_device *of_amba_device_create(struct device_node *node,
if (ret)
goto err_free;
- ret = amba_device_add(dev, &iomem_resource);
+ ret = amba_device_add(dev, parent_resource);
if (ret)
goto err_free;
@@ -307,7 +308,8 @@ err_free:
struct amba_device *of_amba_device_create(struct device_node *node,
const char *bus_id,
void *platform_data,
- struct device *parent)
+ struct device *parent,
+ struct resource *parent_resource)
{
return NULL;
}
@@ -375,7 +377,8 @@ static int of_platform_bus_create(struct device_node *bus,
}
if (of_device_is_compatible(bus, "arm,primecell")) {
- of_amba_device_create(bus, bus_id, platform_data, parent);
+ of_amba_device_create(bus, bus_id, platform_data, parent,
+ &iomem_resource);
return 0;
}
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index 6cd5ac2..be13538 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -66,7 +66,8 @@ extern struct platform_device *of_platform_device_create(struct device_node *np,
extern struct amba_device *of_amba_device_create(struct device_node *node,
const char *bus_id,
void *platform_data,
- struct device *parent);
+ struct device *parent,
+ struct resource *parent_res);
extern int of_platform_bus_probe(struct device_node *root,
const struct of_device_id *matches,
--
1.7.7.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists