netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: linux-sh@vger.kernel.org, Magnus Damm <magnus.damm@gmail.com>,
	Simon Horman <horms@verge.net.au>,
	Steve Glendinning <steve.glendinning@shawell.net>,
	netdev@vger.kernel.org,
	Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Subject: Re: [PATCH 1/4] net: smsc911x: add support for a reset GPIO
Date: Tue, 23 Jul 2013 13:38:09 -0300	[thread overview]
Message-ID: <CAOMZO5AzEgkyRz0N0a3CSS7sWEatT3ZQX9eku1fH6hzheh0ARA@mail.gmail.com> (raw)
In-Reply-To: <1374595924-12338-2-git-send-email-g.liakhovetski@gmx.de>

On Tue, Jul 23, 2013 at 1:12 PM, Guennadi Liakhovetski
<g.liakhovetski@gmx.de> wrote:

> +       if (pdata->config.reset_gpio_config & SMSC911X_RESET_GPIO_VALID) {
> +               /* Take the chip out of hard reset */
> +               unsigned long flags = (pdata->config.reset_gpio_config ^
> +                                      GPIOF_INIT_HIGH) & 0xf;
> +               retval = gpio_request_one(pdata->config.reset_gpio,

If you use devm_gpio_request_one() here, then you can simplify your
code by not having to call gpio_free.

  reply	other threads:[~2013-07-23 16:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-23 16:12 [PATCH 0/4] net: smsc911x: support reset GPIO and use it on ape6evm Guennadi Liakhovetski
2013-07-23 16:12 ` [PATCH 1/4] net: smsc911x: add support for a reset GPIO Guennadi Liakhovetski
2013-07-23 16:38   ` Fabio Estevam [this message]
2013-07-23 16:44     ` Guennadi Liakhovetski
2013-07-23 17:36   ` Sergei Shtylyov
2013-07-23 16:12 ` [PATCH 2/4] net: smsc911x: add a reset GPIO DT binding Guennadi Liakhovetski
2013-07-23 22:10   ` Laurent Pinchart
2013-07-23 22:18   ` Sascha Hauer
2013-07-23 16:12 ` [PATCH 3/4] ARM: shmobile: ape6evm: use smsc911x platform parameters to handle eth reset Guennadi Liakhovetski
2013-07-23 16:12 ` [PATCH 4/4] ARM: shmobile: ape6evm-reference: add smsc911x ethernet support Guennadi Liakhovetski

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=CAOMZO5AzEgkyRz0N0a3CSS7sWEatT3ZQX9eku1fH6hzheh0ARA@mail.gmail.com \
    --to=festevam@gmail.com \
    --cc=g.liakhovetski+renesas@gmail.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=horms@verge.net.au \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=steve.glendinning@shawell.net \
    /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).