linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Alexander Shiyan <shc_work@mail.ru>
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH RESEND 1/2] input: gpio_keys_polled: Convert to devm-* API
Date: Tue, 29 Apr 2014 09:19:27 -0700	[thread overview]
Message-ID: <20140429161926.GA15953@core.coreip.homeip.net> (raw)
In-Reply-To: <1398787420.62147449@f297.i.mail.ru>

On Tue, Apr 29, 2014 at 08:03:40PM +0400, Alexander Shiyan wrote:
> Tue, 29 Apr 2014 08:50:32 -0700 от Dmitry Torokhov <dmitry.torokhov@gmail.com>:
> > On Tue, Apr 29, 2014 at 08:43:48AM +0400, Alexander Shiyan wrote:
> > > Mon, 28 Apr 2014 20:26:00 -0700 от Dmitry Torokhov <dmitry.torokhov@gmail.com>:
> > > > Hi Alexander,
> > > > 
> > > > On Sat, Apr 26, 2014 at 09:53:13AM +0400, Alexander Shiyan wrote:
> > > > > Replace existing resource handling in the driver with managed
> > > > > device resource, this ensures more consistent error values and
> > > > > simplifies error paths.
> > > > > kzalloc -> devm_kzalloc
> > > > > gpio_request_one -> devm_gpio_request_one
> ...
> > > > @@ -162,8 +160,7 @@ static struct gpio_keys_platform_data *gpio_keys_polled_get_devtree_pdata(struct
> > > >  		if (of_property_read_u32(pp, "linux,code", &button->code)) {
> > > >  			dev_err(dev, "Button without keycode: 0x%x\n",
> > > >  				button->gpio);
> > > > -			error = -EINVAL;
> > > > -			goto err_free_pdata;
> > > > +			return ERR_PTR(-EINVAL);
> > > >  		}
> > > 
> > > We can even use return value from of_property_read_u32() on error.
> > > 
> > > All other looks OK.
> > 
> > Do you have hardware that uses gpio_keys_polled?
> 
> Yes.

So did you have a chance to actually try my version(s)? I would feel
much better if you had ;)

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2014-04-29 16:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-26  5:53 [PATCH RESEND 1/2] input: gpio_keys_polled: Convert to devm-* API Alexander Shiyan
2014-04-26  5:53 ` [PATCH RESEND 2/2] input: gpio_keys: " Alexander Shiyan
2014-04-29  2:30   ` Dmitry Torokhov
2014-04-29  3:26 ` [PATCH RESEND 1/2] input: gpio_keys_polled: " Dmitry Torokhov
2014-04-29  4:43   ` Alexander Shiyan
2014-04-29 15:50     ` Dmitry Torokhov
2014-04-29 16:03       ` Alexander Shiyan
2014-04-29 16:19         ` Dmitry Torokhov [this message]
2014-04-29 16:24           ` Alexander Shiyan
2014-04-29 16:36             ` Dmitry Torokhov
2014-04-29 16:40               ` Alexander Shiyan
2014-05-06  4:18                 ` Dmitry Torokhov
2014-05-12  7:15                   ` Alexander Shiyan
2014-05-14 18:07                     ` 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=20140429161926.GA15953@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=shc_work@mail.ru \
    /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).