[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOMZO5AzEgkyRz0N0a3CSS7sWEatT3ZQX9eku1fH6hzheh0ARA@mail.gmail.com>
Date: Tue, 23 Jul 2013 13:38:09 -0300
From: Fabio Estevam <festevam@...il.com>
To: Guennadi Liakhovetski <g.liakhovetski@....de>
Cc: linux-sh@...r.kernel.org, Magnus Damm <magnus.damm@...il.com>,
Simon Horman <horms@...ge.net.au>,
Steve Glendinning <steve.glendinning@...well.net>,
netdev@...r.kernel.org,
Guennadi Liakhovetski <g.liakhovetski+renesas@...il.com>
Subject: Re: [PATCH 1/4] net: smsc911x: add support for a reset GPIO
On Tue, Jul 23, 2013 at 1:12 PM, Guennadi Liakhovetski
<g.liakhovetski@....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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists