Re: [RFC] [PATCH v3 2/4] OMAP4: Keyboard device registration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 31 May 2010 16:44:52 -0500
"Arce, Abraham" <x0066660@xxxxxx> 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux