From: Gregory Bean <gbean@codeaurora.org>
To: Vasiliy Kulikov <segooon@gmail.com>
Cc: kernel-janitors@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpio: sx150x: fix error code value
Date: Mon, 13 Sep 2010 09:23:03 -0700 [thread overview]
Message-ID: <4C8E4FE7.4080808@codeaurora.org> (raw)
In-Reply-To: <1284317845-5181-1-git-send-email-segooon@gmail.com>
> err = sx150x_i2c_read(chip->client, reg,&data);
> if (err>= 0)
> - err = (data& mask) != 0 ? 1 : 0;
> + err = (data& mask) != 0 ? -EIO : 0;
>
This doesn't work. The IO pins are gpio data pins, which are used as 0
or 1 data values (see sx150x_gpio_get). Returning -EIO whenever an
attempt is made to gpio_get_value on a non-zero gpio line will break things.
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
prev parent reply other threads:[~2010-09-13 16:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-12 18:57 [PATCH] gpio: sx150x: fix error code value Vasiliy Kulikov
2010-09-13 16:23 ` Gregory Bean [this message]
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=4C8E4FE7.4080808@codeaurora.org \
--to=gbean@codeaurora.org \
--cc=akpm@linux-foundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=segooon@gmail.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