LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] at91_mci: minor cleanup
[not found] <200801151444.21140.marc.pignat@hevs.ch>
@ 2008-01-30 16:45 ` Nicolas Ferre
2008-02-05 6:52 ` Pierre Ossman
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Ferre @ 2008-01-30 16:45 UTC (permalink / raw)
To: Pierre Ossman
Cc: Marc Pignat, Andrew Victor, ARM Linux Mailing List, Linux Kernel list
From: Marc Pignat <marc.pignat@hevs.ch>
MMC_POWER_ON is a noop, no need to set the power pin again.
Signed-off-by: Marc Pignat <marc.pignat@hevs.ch>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
MMC_POWER_OFF/MMC_POWER_UP turn the power OFF/ON, there is nothing to change
when ios->power_mode==MMC_POWER_ON.
Also changed indentation for the switch (CodingStyle), because there is no other
switch statement in this driver.
--- a/drivers/mmc/host/at91_mci.c
+++ b/drivers/mmc/host/at91_mci.c
@@ -658,13 +658,14 @@ static void at91_mci_set_ios(struct mmc_
/* maybe switch power to the card */
if (host->board->vcc_pin) {
switch (ios->power_mode) {
- case MMC_POWER_OFF:
- at91_set_gpio_value(host->board->vcc_pin, 0);
- break;
- case MMC_POWER_UP:
- case MMC_POWER_ON:
- at91_set_gpio_value(host->board->vcc_pin, 1);
- break;
+ case MMC_POWER_OFF:
+ at91_set_gpio_value(host->board->vcc_pin, 0);
+ break;
+ case MMC_POWER_UP:
+ at91_set_gpio_value(host->board->vcc_pin, 1);
+ break;
+ default:
+ break;
}
}
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] at91_mci: minor cleanup
2008-01-30 16:45 ` [PATCH] at91_mci: minor cleanup Nicolas Ferre
@ 2008-02-05 6:52 ` Pierre Ossman
0 siblings, 0 replies; 2+ messages in thread
From: Pierre Ossman @ 2008-02-05 6:52 UTC (permalink / raw)
To: Nicolas Ferre
Cc: Marc Pignat, Andrew Victor, ARM Linux Mailing List, Linux Kernel list
[-- Attachment #1: Type: text/plain, Size: 420 bytes --]
On Wed, 30 Jan 2008 17:45:48 +0100
Nicolas Ferre <nicolas.ferre@atmel.com> wrote:
> From: Marc Pignat <marc.pignat@hevs.ch>
>
> MMC_POWER_ON is a noop, no need to set the power pin again.
>
> Signed-off-by: Marc Pignat <marc.pignat@hevs.ch>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
Perhaps also a WARN_ON() or something in the default case to catch bad invokations?
Rgds
Pierre
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-05 6:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <200801151444.21140.marc.pignat@hevs.ch>
2008-01-30 16:45 ` [PATCH] at91_mci: minor cleanup Nicolas Ferre
2008-02-05 6:52 ` Pierre Ossman
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).