From: Wolfram Sang <w.sang@pengutronix.de>
To: Anatolij Gustschin <agust@denx.de>
Cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org,
Linus Walleij <linus.walleij@stericsson.com>
Subject: Re: [PATCH RESEND] gpio: mpc8xxx: don't allow input-only pins to be output for MPC5121
Date: Tue, 13 Dec 2011 11:03:43 +0100 [thread overview]
Message-ID: <20111213100343.GA2619@pengutronix.de> (raw)
In-Reply-To: <20111213105243.101ced70@wker>
[-- Attachment #1: Type: text/plain, Size: 1256 bytes --]
On Tue, Dec 13, 2011 at 10:52:43AM +0100, Anatolij Gustschin wrote:
> Hi Wolfram,
>
> Looks mostly good to me. Please see minor comments below.
>
> On Tue, 13 Dec 2011 10:12:48 +0100
> Wolfram Sang <w.sang@pengutronix.de> wrote:
> ...
> > diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c
> > index ec3fcf0..25dc736 100644
> > --- a/drivers/gpio/gpio-mpc8xxx.c
> > +++ b/drivers/gpio/gpio-mpc8xxx.c
> > @@ -115,6 +115,14 @@ static int mpc8xxx_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio)
> > return 0;
> > }
> >
> > +static int mpc5121_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
>
> Line over 80 chars.
In this case, I think the alternative would be far less readable.
> > +{
> > + /* GPIO 28..31 are input only on MPC5121 */
> > + if (gpio >= 28)
> > + return -EINVAL;
> > +
> > + return mpc8xxx_gpio_dir_out(gc, gpio, val);
> > +}
> > static int mpc8xxx_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val)
>
> Please separate by an empty line. Thanks.
Ups, yes.
Thanks,
Wolfram
--
Pengutronix e.K. | Wolfram Sang |
Industrial Linux Solutions | http://www.pengutronix.de/ |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2011-12-13 10:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-13 9:12 [PATCH RESEND] gpio: mpc8xxx: don't allow input-only pins to be output for MPC5121 Wolfram Sang
2011-12-13 9:52 ` Anatolij Gustschin
2011-12-13 10:03 ` Wolfram Sang [this message]
2011-12-13 18:07 ` Grant Likely
2011-12-13 18:16 ` Grant Likely
2011-12-13 18:23 ` Wolfram Sang
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=20111213100343.GA2619@pengutronix.de \
--to=w.sang@pengutronix.de \
--cc=agust@denx.de \
--cc=linus.walleij@stericsson.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.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).