summaryrefslogtreecommitdiff
path: root/arch/arm/plat-omap/omap_device.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@deeprootsystems.com>2010-07-26 16:34:30 -0600
committerPaul Walmsley <paul@pwsan.com>2010-07-26 16:34:30 -0600
commit0656358159d7e26205bb9360840759c7c3c0725f (patch)
tree7ce6f98ba6d2a87fd6890f4960c17feedb8f2a5b /arch/arm/plat-omap/omap_device.c
parent681fddc6d087359c1e3f86529973f5bf62afe4c0 (diff)
OMAP: omap_device: ensure hwmod tracks attached omap_device pointer
The omap_hwmod struct has a field to track the omap_device that is attached to it, but it was not being assigned. Fix by assigning omap_device pointer when omap_device is built. Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> [paul@pwsan.com: use an array index rather than pointer arithmetic] Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/plat-omap/omap_device.c')
-rw-r--r--arch/arm/plat-omap/omap_device.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index f899603051ac..f9dec0d32fa4 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -359,7 +359,7 @@ struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id,
struct omap_device *od;
char *pdev_name2;
struct resource *res = NULL;
- int res_count;
+ int i, res_count;
struct omap_hwmod **hwmods;
if (!ohs || oh_cnt == 0 || !pdev_name)
@@ -416,6 +416,9 @@ struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id,
else
ret = omap_device_register(od);
+ for (i = 0; i < oh_cnt; i++)
+ hwmods[i]->od = od;
+
if (ret)
goto odbs_exit4;