Thanks Thomas,

> > +   unsigned int length = 0, id = 0;
> > +   int hw_mod_name_len = 16;
> > +   char oh_name[hw_mod_name_len];
> > +   char *name = "omap4-keypad";
> > +
> > +   length = snprintf(oh_name, hw_mod_name_len, "kbd");
> > +
> > +   oh = omap_hwmod_lookup(oh_name);
> > +   if (!oh) {
> > +           pr_err("Could not look up %s\n", oh_name);
> > +           return -EIO;
> > +   }
> 
> Maybe I'm missing something here, but I don't see where "length" is
> being used, and why the snprintf()/oh_name thing is needed. What about:
> 
>       unsigned int id = 0;
>       char *name = "omap4-keypad";
> 
>       oh = omap_hwmod_lookup("kbd");
>       if (!oh) {
>               pr_err("Could not look up kbd\n");
>               return -EIO;
>       }

I'll remove length variable and keep snprintf, below oh_name -> kbd is used 
again, this will keep name defined in one single place

        WARN(IS_ERR(od), "Could not build omap_device for %s %s\n",
                name, oh_name);

Best Regards
Abraham
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to