From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: michael.hennerich@analog.com
Cc: linux-input@vger.kernel.org,
device-drivers-devel@blackfin.uclinux.org, drivers@analog.com
Subject: Re: [PATCH RESEND] input: keyboard: adp5589-keys: Add support for the ADP5585 derivatives
Date: Tue, 18 Oct 2011 21:26:13 -0700 [thread overview]
Message-ID: <20111019042613.GA3077@core.coreip.homeip.net> (raw)
In-Reply-To: <1318486726-6425-1-git-send-email-michael.hennerich@analog.com>
Hi Michael,
On Thu, Oct 13, 2011 at 08:18:46AM +0200, michael.hennerich@analog.com wrote:
> static void __devinit adp5589_report_switch_state(struct adp5589_kpad *kpad)
> {
> - int gpi_stat1 = adp5589_read(kpad->client, ADP5589_GPI_STATUS_A);
> - int gpi_stat2 = adp5589_read(kpad->client, ADP5589_GPI_STATUS_B);
> - int gpi_stat3 = adp5589_read(kpad->client, ADP5589_GPI_STATUS_C);
> - int gpi_stat_tmp, pin_loc;
> + int gpi_stat_tmp, pin_loc, gpi_stat3;
> int i;
> + int gpi_stat1 = adp5589_read(kpad->client,
> + kpad->var->reg(ADP5589_GPI_STATUS_A));
> + int gpi_stat2 = adp5589_read(kpad->client,
> + kpad->var->reg(ADP5589_GPI_STATUS_B));
> + if (!kpad->is_adp5585)
> + gpi_stat3 = adp5589_read(kpad->client, ADP5589_GPI_STATUS_C);
This cause my compiler to complain that gpi_stat3 might be used
uninitialized; I changed it to
int gpi_stat3 = !kpad->is_adp5585 ?
adp5589_read(kpad->client, ADP5589_GPI_STATUS_C) : 0;
and applied.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2011-10-19 4:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-13 6:18 [PATCH RESEND] input: keyboard: adp5589-keys: Add support for the ADP5585 derivatives michael.hennerich
2011-10-19 4:26 ` Dmitry Torokhov [this message]
2011-10-19 7:08 ` Hennerich, Michael
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=20111019042613.GA3077@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=device-drivers-devel@blackfin.uclinux.org \
--cc=drivers@analog.com \
--cc=linux-input@vger.kernel.org \
--cc=michael.hennerich@analog.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).