On Mon, 31 May 2010 16:44:52 -0500
"Arce, Abraham" <[email protected]> wrote:
> + 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;
}
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html