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] [day] [month] [year] [list]
Message-ID: <20110906081416.GC28816@pengutronix.de>
Date:	Tue, 6 Sep 2011 10:14:16 +0200
From:	Uwe Kleine-König 
	<u.kleine-koenig@...gutronix.de>
To:	Thomas Weber <weber@...science.de>
Cc:	silesh@...com, Russell King <linux@....linux.org.uk>,
	Tony Lindgren <tony@...mide.com>,
	open list <linux-kernel@...r.kernel.org>,
	"open list:OMAP SUPPORT" <linux-omap@...r.kernel.org>,
	"open list:ARM PORT" <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] OMAP: hsmmc: Fix mux for non-OMAP pins

Hello Thomas,

On Tue, Sep 06, 2011 at 10:08:03AM +0200, Thomas Weber wrote:
> The Devkit8000 uses a TWL4030 pin for card detection.
> Thats why the error:
> _omap_mux_init_gpio: Could not set gpio192
> occurs.
> 
> This patch checks that the pin is on OMAP before
> calling omap_mux_init_gpio.
> 
> Signed-off-by: Thomas Weber <weber@...science.de>
> ---
>  arch/arm/mach-omap2/hsmmc.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
> index a9b45c7..783d0f1 100644
> --- a/arch/arm/mach-omap2/hsmmc.c
> +++ b/arch/arm/mach-omap2/hsmmc.c
> @@ -214,10 +214,12 @@ static int nop_mmc_set_power(struct device *dev, int slot, int power_on,
>  static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller,
>  			int controller_nr)
>  {
> -	if (gpio_is_valid(mmc_controller->slots[0].switch_pin))
> +	if (gpio_is_valid(mmc_controller->slots[0].switch_pin) && \
That backslash at the line end is not needed and looks ugly.

> +		(mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES))
>  		omap_mux_init_gpio(mmc_controller->slots[0].switch_pin,
>  					OMAP_PIN_INPUT_PULLUP);
> -	if (gpio_is_valid(mmc_controller->slots[0].gpio_wp))
> +	if (gpio_is_valid(mmc_controller->slots[0].gpio_wp) && \
> +		(mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES))
>  		omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp,
>  					OMAP_PIN_INPUT_PULLUP);
>  	if (cpu_is_omap34xx()) {

Best regards
Uwe


-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
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