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]
Date:	Thu, 17 Jan 2008 01:34:16 -0800
From:	David Brownell <david-b@...bell.net>
To:	Nicolas Ferre <nicolas.ferre@...el.com>
Cc:	Linux Kernel list <linux-kernel@...r.kernel.org>,
	ARM Linux Mailing List 
	<linux-arm-kernel@...ts.arm.linux.org.uk>,
	Andrew Victor <linux@...im.org.za>
Subject: Re: [PATCH] AT91: correct at91sam9263ek LCD power gpio pin

On Thursday 17 January 2008, Nicolas Ferre wrote:
>  static void at91_lcdc_power_control(int on)
>  {
>         if (on)
> -               at91_set_gpio_value(AT91_PIN_PD12, 0);  /* power up */
> +               at91_set_gpio_value(AT91_PIN_PA30, 1);  /* power up */
>         else
> -               at91_set_gpio_value(AT91_PIN_PD12, 1);  /* power down */
> +               at91_set_gpio_value(AT91_PIN_PA30, 0);  /* power down */
>  }

It would really be a lot simpler as just:

	gpio_set_value(AT91_PIN_PA30, on);

This isn't a case where SOC-specific mechanisms need to kick in
(like enabling open drain output drive mode, or input debounce);
and even the SOC-specific calls handle that "if" themselves.  :)

- Dave


--
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