<div class="gmail_quote">On Wed, May 11, 2011 at 2:12 AM, Shweta Gulati <span dir="ltr"><<a href="mailto:shweta.gulati@ti.com">shweta.gulati@ti.com</a>></span> wrote:<br><div>... </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
diff --git a/arch/arm/mach-omap2/sr_device.c b/arch/arm/mach-omap2/sr_device.c<br>
index 2782d3f..65b2aae 100644<br>
--- a/arch/arm/mach-omap2/sr_device.c<br>
+++ b/arch/arm/mach-omap2/sr_device.c<br>
@@ -82,6 +82,7 @@ static int sr_dev_init(struct omap_hwmod *oh, void *user)<br>
struct omap_sr_data *sr_data;<br>
struct omap_device *od;<br>
struct omap_volt_data *volt_data;<br>
+ struct omap_sr_dev_attr *sr_dev_attr;<br>
char *name = "smartreflex";<br>
static int i;<br>
<br>
@@ -92,9 +93,11 @@ static int sr_dev_init(struct omap_hwmod *oh, void *user)<br>
return -ENOMEM;<br>
}<br>
<br>
- if (!oh->vdd_name) {<br>
+ sr_dev_attr = (struct omap_sr_dev_attr *)oh->dev_attr;<br>
+ if (!sr_dev_attr->voltdm_name) {<br>
pr_err("%s: No voltage domain specified for %s."<br></blockquote><div><br></div><div>Suggest if (!sr_dev_attr || !sr_dev_attr->voltdm_name) to catch this error.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
- "Cannot initialize\n", __func__, oh->name);<br>
+ "Cannot initialize\n", __func__,<br>
+ sr_dev_attr->voltdm_name);<br></blockquote><div><br></div><div>Should leave the hwmod's oh->name as the pr_err param, sr_dev_attr->voltdm_name has just been verified bogus.</div>
<div> </div><div><br></div><div>Todd</div><div><br></div></div><br>