diff mbox

[RFC,06/10] OMAP: GPIO: Use USHRT_MAX for rev offset instead of -1

Message ID 1305546104-1511-7-git-send-email-tarun.kanti@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tarun Kanti DebBarma May 16, 2011, 11:41 a.m. UTC
From: Charulatha V <charu@ti.com>

Use USHRT_MAX for revision offset instead of -1 if revision register
is not available for a given SoC since rev offset is a u16 value.

Signed-off-by: Charulatha V <charu@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap1/gpio15xx.c |    2 +-
 arch/arm/mach-omap1/gpio16xx.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Kevin Hilman May 19, 2011, 3:59 p.m. UTC | #1
Tarun Kanti DebBarma <tarun.kanti@ti.com> writes:

> From: Charulatha V <charu@ti.com>
>
> Use USHRT_MAX for revision offset instead of -1 if revision register
> is not available for a given SoC since rev offset is a u16 value.
>
> Signed-off-by: Charulatha V <charu@ti.com>
> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Cc: Kevin Hilman <khilman@ti.com>
> Cc: Tony Lindgren <tony@atomide.com>

Thanks, folded this into the original.

Kevin

> ---
>  arch/arm/mach-omap1/gpio15xx.c |    2 +-
>  arch/arm/mach-omap1/gpio16xx.c |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap1/gpio15xx.c b/arch/arm/mach-omap1/gpio15xx.c
> index 7a15f69..f18a4a9 100644
> --- a/arch/arm/mach-omap1/gpio15xx.c
> +++ b/arch/arm/mach-omap1/gpio15xx.c
> @@ -77,7 +77,7 @@ static struct __initdata resource omap15xx_gpio_resources[] = {
>  };
>  
>  static struct omap_gpio_reg_offs omap15xx_gpio_regs = {
> -	.revision	= -1,
> +	.revision	= USHRT_MAX,
>  	.direction	= OMAP1510_GPIO_DIR_CONTROL,
>  	.datain		= OMAP1510_GPIO_DATA_INPUT,
>  	.dataout	= OMAP1510_GPIO_DATA_OUTPUT,
> diff --git a/arch/arm/mach-omap1/gpio16xx.c b/arch/arm/mach-omap1/gpio16xx.c
> index 43718ec..d886b88 100644
> --- a/arch/arm/mach-omap1/gpio16xx.c
> +++ b/arch/arm/mach-omap1/gpio16xx.c
> @@ -38,7 +38,7 @@ static struct __initdata resource omap16xx_mpu_gpio_resources[] = {
>  };
>  
>  static struct omap_gpio_reg_offs omap16xx_mpuio_regs = {
> -	.revision       = -1,
> +	.revision       = USHRT_MAX,
>  	.direction	= OMAP_MPUIO_IO_CNTL,
>  	.datain		= OMAP_MPUIO_INPUT_LATCH,
>  	.dataout	= OMAP_MPUIO_OUTPUT,
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
charu@ti.com May 20, 2011, 8:31 a.m. UTC | #2
Kevin,

On Thu, May 19, 2011 at 21:29, Kevin Hilman <khilman@ti.com> wrote:
> Tarun Kanti DebBarma <tarun.kanti@ti.com> writes:
>
>> From: Charulatha V <charu@ti.com>
>>
>> Use USHRT_MAX for revision offset instead of -1 if revision register
>> is not available for a given SoC since rev offset is a u16 value.
>>
>> Signed-off-by: Charulatha V <charu@ti.com>
>> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
>> Cc: Kevin Hilman <khilman@ti.com>
>> Cc: Tony Lindgren <tony@atomide.com>
>
> Thanks, folded this into the original.

I could not figure out this change in the repo. Please update.

-V Charulatha

>
> Kevin
>
>> ---
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kevin Hilman May 20, 2011, 9:30 a.m. UTC | #3
"Varadarajan, Charulatha" <charu@ti.com> writes:

> Kevin,
>
> On Thu, May 19, 2011 at 21:29, Kevin Hilman <khilman@ti.com> wrote:
>> Tarun Kanti DebBarma <tarun.kanti@ti.com> writes:
>>
>>> From: Charulatha V <charu@ti.com>
>>>
>>> Use USHRT_MAX for revision offset instead of -1 if revision register
>>> is not available for a given SoC since rev offset is a u16 value.
>>>
>>> Signed-off-by: Charulatha V <charu@ti.com>
>>> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
>>> Cc: Kevin Hilman <khilman@ti.com>
>>> Cc: Tony Lindgren <tony@atomide.com>
>>
>> Thanks, folded this into the original.
>
> I could not figure out this change in the repo. Please update.

You're right, I didn't push the update.

Just pushed now (may take some time to get out to kernel.org mirrors.)

Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/mach-omap1/gpio15xx.c b/arch/arm/mach-omap1/gpio15xx.c
index 7a15f69..f18a4a9 100644
--- a/arch/arm/mach-omap1/gpio15xx.c
+++ b/arch/arm/mach-omap1/gpio15xx.c
@@ -77,7 +77,7 @@  static struct __initdata resource omap15xx_gpio_resources[] = {
 };
 
 static struct omap_gpio_reg_offs omap15xx_gpio_regs = {
-	.revision	= -1,
+	.revision	= USHRT_MAX,
 	.direction	= OMAP1510_GPIO_DIR_CONTROL,
 	.datain		= OMAP1510_GPIO_DATA_INPUT,
 	.dataout	= OMAP1510_GPIO_DATA_OUTPUT,
diff --git a/arch/arm/mach-omap1/gpio16xx.c b/arch/arm/mach-omap1/gpio16xx.c
index 43718ec..d886b88 100644
--- a/arch/arm/mach-omap1/gpio16xx.c
+++ b/arch/arm/mach-omap1/gpio16xx.c
@@ -38,7 +38,7 @@  static struct __initdata resource omap16xx_mpu_gpio_resources[] = {
 };
 
 static struct omap_gpio_reg_offs omap16xx_mpuio_regs = {
-	.revision       = -1,
+	.revision       = USHRT_MAX,
 	.direction	= OMAP_MPUIO_IO_CNTL,
 	.datain		= OMAP_MPUIO_INPUT_LATCH,
 	.dataout	= OMAP_MPUIO_OUTPUT,