lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4ED734AD.1070303@compulab.co.il>
Date:	Thu, 01 Dec 2011 10:02:53 +0200
From:	Igor Grinberg <grinberg@...pulab.co.il>
To:	Axel Lin <axel.lin@...il.com>
CC:	linux-kernel@...r.kernel.org,
	Misael Lopez Cruz <misael.lopez@...com>,
	Jorge Eduardo Candelaria <jorge.candelaria@...com>,
	Samuel Ortiz <sameo@...ux.intel.com>
Subject: Re: [PATCH 4/4] mfd: twl6040-core: Use gpio_request_one

On 12/01/11 03:55, Axel Lin wrote:
> Use gpio_request_one() instead of multiple gpiolib calls.
> 
> Signed-off-by: Axel Lin <axel.lin@...il.com>
> ---
>  drivers/mfd/twl6040-core.c |    7 ++-----
>  1 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/mfd/twl6040-core.c b/drivers/mfd/twl6040-core.c
> index 268f80f..e57b1d1 100644
> --- a/drivers/mfd/twl6040-core.c
> +++ b/drivers/mfd/twl6040-core.c
> @@ -509,13 +509,10 @@ static int __devinit twl6040_probe(struct platform_device *pdev)
>  		twl6040->audpwron = -EINVAL;
>  
>  	if (gpio_is_valid(twl6040->audpwron)) {
> -		ret = gpio_request(twl6040->audpwron, "audpwron");
> +		ret = gpio_request_one(twl6040->audpwron, GPIOF_OUT_INIT_LOW,
> +				       "audpwron");
>  		if (ret)
>  			goto gpio1_err;
> -
> -		ret = gpio_direction_output(twl6040->audpwron, 0);
> -		if (ret)
> -			goto gpio2_err;
>  	}

same here, double check gpio_is_valid()?


-- 
Regards,
Igor.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ