From: Silesh C V <silesh@ti.com> To: linux-omap@vger.kernel.org Cc: kishore.kadiyala@ti.com, balajitk@ti.com, linux-arm-kernel@lists.infradead.org, Silesh C V <silesh@ti.com> Subject: [PATCH] OMAP: HSMMC: Fix GPIO muxing Date: Tue, 28 Jun 2011 14:15:59 +0530 [thread overview] Message-ID: <1309250759-18472-1-git-send-email-silesh@ti.com> (raw) Use generic gpio call to check the validity of the gpio. Note that this includes gpio 0 also which was missing before. Signed-off-by: Silesh C V <silesh@ti.com> --- arch/arm/mach-omap2/hsmmc.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index 66868c5..a9b45c7 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c @@ -13,6 +13,7 @@ #include <linux/slab.h> #include <linux/string.h> #include <linux/delay.h> +#include <linux/gpio.h> #include <mach/hardware.h> #include <plat/mmc.h> #include <plat/omap-pm.h> @@ -213,12 +214,10 @@ 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 ((mmc_controller->slots[0].switch_pin > 0) && \ - (mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES)) + if (gpio_is_valid(mmc_controller->slots[0].switch_pin)) omap_mux_init_gpio(mmc_controller->slots[0].switch_pin, OMAP_PIN_INPUT_PULLUP); - if ((mmc_controller->slots[0].gpio_wp > 0) && \ - (mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES)) + if (gpio_is_valid(mmc_controller->slots[0].gpio_wp)) omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp, OMAP_PIN_INPUT_PULLUP); if (cpu_is_omap34xx()) { -- 1.7.1
WARNING: multiple messages have this Message-ID (diff)
From: silesh@ti.com (Silesh C V) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] OMAP: HSMMC: Fix GPIO muxing Date: Tue, 28 Jun 2011 14:15:59 +0530 [thread overview] Message-ID: <1309250759-18472-1-git-send-email-silesh@ti.com> (raw) Use generic gpio call to check the validity of the gpio. Note that this includes gpio 0 also which was missing before. Signed-off-by: Silesh C V <silesh@ti.com> --- arch/arm/mach-omap2/hsmmc.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index 66868c5..a9b45c7 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c @@ -13,6 +13,7 @@ #include <linux/slab.h> #include <linux/string.h> #include <linux/delay.h> +#include <linux/gpio.h> #include <mach/hardware.h> #include <plat/mmc.h> #include <plat/omap-pm.h> @@ -213,12 +214,10 @@ 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 ((mmc_controller->slots[0].switch_pin > 0) && \ - (mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES)) + if (gpio_is_valid(mmc_controller->slots[0].switch_pin)) omap_mux_init_gpio(mmc_controller->slots[0].switch_pin, OMAP_PIN_INPUT_PULLUP); - if ((mmc_controller->slots[0].gpio_wp > 0) && \ - (mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES)) + if (gpio_is_valid(mmc_controller->slots[0].gpio_wp)) omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp, OMAP_PIN_INPUT_PULLUP); if (cpu_is_omap34xx()) { -- 1.7.1
next reply other threads:[~2011-06-28 8:45 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-06-28 8:45 Silesh C V [this message] 2011-06-28 8:45 ` [PATCH] OMAP: HSMMC: Fix GPIO muxing Silesh C V 2011-06-28 11:37 ` S, Venkatraman 2011-06-28 11:37 ` S, Venkatraman 2011-06-28 13:50 ` Igor Grinberg 2011-06-28 13:50 ` Igor Grinberg 2011-06-29 1:26 ` Silesh C V 2011-06-29 1:26 ` Silesh C V
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1309250759-18472-1-git-send-email-silesh@ti.com \ --to=silesh@ti.com \ --cc=balajitk@ti.com \ --cc=kishore.kadiyala@ti.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-omap@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.