linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
To: Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
Cc: Michael Hennerich
	<michael.hennerich-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>,
	Dmitry Torokhov
	<dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org
Subject: Re: [PATCH] input/keyboard: new driver for ADP5520 MFD PMICs
Date: Sat, 19 Sep 2009 23:30:44 -0700	[thread overview]
Message-ID: <20090919233044.8361a912.akpm@linux-foundation.org> (raw)
In-Reply-To: <1253211850-29309-1-git-send-email-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>

On Thu, 17 Sep 2009 14:24:10 -0400 Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org> wrote:

> ...
> +struct adp5520_keys {
> +	struct input_dev *input;
> +	struct notifier_block notifier;
> +	struct device *master;
> +	unsigned short keycode[ADP5520_KEYMAPSIZE];

Where is ADP5520_KEYMAPSIZE defined?

I can find a single instance in the tree:

./arch/blackfin/mach-bf537/boards/stamp.c:static const unsigned short adp5520_keymap[ADP5520_KEYMAPSIZE] = {
	
is it runtime-generated or something?

> +};
> +
> +static void adp5520_keys_report_event(struct adp5520_keys *dev,
> +					unsigned short keymask, int value)
> +{
> +	int i;
> +
> +	for (i = 0; i < ADP5520_MAXKEYS; i++)

Where is ADP5520_MAXKEYS defined?

> +		if (keymask & (1 << i))
> +			input_report_key(dev->input, dev->keycode[i], value);

It seems odd that keycode is dimensioned with ADP5520_KEYMAPSIZE but
here we iterate up to ADP5520_MAXKEYS.

> +
> +	input_sync(dev->input);
> +}
> +
> ...

  parent reply	other threads:[~2009-09-20  6:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-17 18:24 [PATCH] input/keyboard: new driver for ADP5520 MFD PMICs Mike Frysinger
     [not found] ` <1253211850-29309-1-git-send-email-vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org>
2009-09-20  6:30   ` Andrew Morton [this message]
2009-09-20 22:40     ` [Uclinux-dist-devel] " Mike Frysinger
2009-09-21  4:04       ` Andrew Morton
     [not found]         ` <20090920210451.60ad1b1f.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2009-09-21 13:40           ` Mike Frysinger
2009-09-21 18:23             ` [Uclinux-dist-devel] " Andrew Morton
2009-09-22  5:59 ` Dmitry Torokhov
2009-09-22  7:33   ` Jiri Kosina
2009-09-22  7:53     ` Hennerich, Michael
2009-09-22  7:56       ` Jiri Kosina
2009-09-22 14:21         ` Mike Frysinger
2009-09-22 15:06       ` Dmitry Torokhov
2009-09-23  5:15 ` [PATCH v2] " Mike Frysinger
2009-09-23  6:28   ` Dmitry Torokhov

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=20090919233044.8361a912.akpm@linux-foundation.org \
    --to=akpm-de/tnxtf+jlsfhdxvbkv3wd2fqjk+8+b@public.gmane.org \
    --cc=dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=michael.hennerich-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org \
    --cc=uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org \
    --cc=vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org \
    /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).