<div class="gmail_quote">On Wed, May 11, 2011 at 2:12 AM, Shweta Gulati <span dir="ltr">&lt;<a href="mailto:shweta.gulati@ti.com">shweta.gulati@ti.com</a>&gt;</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 = &quot;smartreflex&quot;;<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-&gt;vdd_name) {<br>
+       sr_dev_attr = (struct omap_sr_dev_attr *)oh-&gt;dev_attr;<br>
+       if (!sr_dev_attr-&gt;voltdm_name) {<br>
                pr_err(&quot;%s: No voltage domain specified for %s.&quot;<br></blockquote><div><br></div><div>Suggest if (!sr_dev_attr || !sr_dev_attr-&gt;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;">

-                       &quot;Cannot initialize\n&quot;, __func__, oh-&gt;name);<br>
+                               &quot;Cannot initialize\n&quot;, __func__,<br>
+                                       sr_dev_attr-&gt;voltdm_name);<br></blockquote><div><br></div><div>Should leave the hwmod&#39;s oh-&gt;name as the pr_err param, sr_dev_attr-&gt;voltdm_name has just been verified bogus.</div>
<div> </div><div><br></div><div>Todd</div><div><br></div></div><br>