linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: "Arce, Abraham" <x0066660@ti.com>
Cc: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"dmitry.torokhov@gmail.com" <dmitry.torokhov@gmail.com>
Subject: Re: [RFC] [PATCH v3 2/4] OMAP4: Keyboard device registration
Date: Wed, 2 Jun 2010 10:28:13 +0200	[thread overview]
Message-ID: <20100602102813.59519b77@surf> (raw)
In-Reply-To: <27F9C60D11D683428E133F85D2BB4A53043E537F74@dlee03.ent.ti.com>

On Mon, 31 May 2010 16:44:52 -0500
"Arce, Abraham" <x0066660@ti.com> 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

  parent reply	other threads:[~2010-06-02  8:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-31 21:44 [RFC] [PATCH v3 2/4] OMAP4: Keyboard device registration Arce, Abraham
2010-06-01  4:47 ` Felipe Balbi
2010-06-01  4:49   ` Felipe Balbi
2010-06-01 17:48     ` Kevin Hilman
2010-06-01  9:43 ` Tony Lindgren
2010-06-01 15:14   ` Arce, Abraham
2010-06-01 18:53     ` Felipe Balbi
2010-06-01 20:13       ` Dmitry Torokhov
2010-06-11  7:31         ` Tony Lindgren
2010-06-02  8:28 ` Thomas Petazzoni [this message]
2010-06-02 12:45   ` Arce, Abraham
2010-06-02 13:46     ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100602102813.59519b77@surf \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=x0066660@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).