All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] omap: get rid of a useless cast
@ 2008-09-30 18:46 Felipe Balbi
  2008-10-17 21:54 ` Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: Felipe Balbi @ 2008-09-30 18:46 UTC (permalink / raw)
  To: linux-omap; +Cc: Felipe Balbi

That cast was annyoing for quite a while. Now
omap_ctrl_base_get() returns void __iomem *
and __raw_read/write friends uses void __iomem *
so there's no need for casting.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
---
 arch/arm/mach-omap2/board-3430sdp.c |    7 ++++---
 arch/arm/mach-omap2/board-ldp.c     |    7 ++++---
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index 4264b68..530a4d4 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -129,7 +129,8 @@ static int __init msecure_init(void)
 	/* 3430ES2.0 doesn't have msecure/gpio-22 line connected to T2 */
 	if (omap_type() == OMAP2_DEVICE_TYPE_GP &&
 			system_rev < OMAP3430_REV_ES2_0) {
-		u32 msecure_pad_config_reg = omap_ctrl_base_get() + 0xA3C;
+		void __iomem *msecure_pad_config_reg = omap_ctrl_base_get() +
+			0xA3C;
 		int mux_mask = 0x04;
 		u16 tmp;
 
@@ -144,10 +145,10 @@ static int __init msecure_init(void)
 		 * is low. Make msecure line high in order to change the
 		 * TWL4030 RTC time and calender registers.
 		 */
-		tmp = omap_readw(msecure_pad_config_reg);
+		tmp = __raw_readw(msecure_pad_config_reg);
 		tmp &= 0xF8; /* To enable mux mode 03/04 = GPIO_RTC */
 		tmp |= mux_mask;/* To enable mux mode 03/04 = GPIO_RTC */
-		omap_writew(tmp, msecure_pad_config_reg);
+		__raw_writew(tmp, msecure_pad_config_reg);
 
 		gpio_direction_output(TWL4030_MSECURE_GPIO, 1);
 	}
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index 35c03b7..96452ad 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -56,7 +56,8 @@ static int __init msecure_init(void)
 	/* 3430ES2.0 doesn't have msecure/gpio-22 line connected to T2 */
 	if (omap_device_type() == OMAP2_DEVICE_TYPE_GP &&
 			system_rev < OMAP3430_REV_ES2_0) {
-		u32 msecure_pad_config_reg = omap_ctrl_base_get() + 0xA3C;
+		void __iomem *msecure_pad_config_reg = omap_ctrl_base_get() +
+			0xA3C;
 		int mux_mask = 0x04;
 		u16 tmp;
 
@@ -72,10 +73,10 @@ static int __init msecure_init(void)
 		 * TWL4030 RTC time and calender registers.
 		 */
 
-		tmp = omap_readw(msecure_pad_config_reg);
+		tmp = __raw_readw(msecure_pad_config_reg);
 		tmp &= 0xF8;	/* To enable mux mode 03/04 = GPIO_RTC */
 		tmp |= mux_mask;/* To enable mux mode 03/04 = GPIO_RTC */
-		omap_writew(tmp, msecure_pad_config_reg);
+		__raw_writew(tmp, msecure_pad_config_reg);
 
 		gpio_direction_output(TWL4030_MSECURE_GPIO, 1);
 	}
-- 
1.6.0.1.196.g01914


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] omap: get rid of a useless cast
  2008-09-30 18:46 [PATCH] omap: get rid of a useless cast Felipe Balbi
@ 2008-10-17 21:54 ` Tony Lindgren
  0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2008-10-17 21:54 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: linux-omap

* Felipe Balbi <felipe.balbi@nokia.com> [080930 11:49]:
> That cast was annyoing for quite a while. Now
> omap_ctrl_base_get() returns void __iomem *
> and __raw_read/write friends uses void __iomem *
> so there's no need for casting.

Pushing the board-3430sdp.c changes, board-ldp.c is already fixed.

Tony


> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
> ---
>  arch/arm/mach-omap2/board-3430sdp.c |    7 ++++---
>  arch/arm/mach-omap2/board-ldp.c     |    7 ++++---
>  2 files changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
> index 4264b68..530a4d4 100644
> --- a/arch/arm/mach-omap2/board-3430sdp.c
> +++ b/arch/arm/mach-omap2/board-3430sdp.c
> @@ -129,7 +129,8 @@ static int __init msecure_init(void)
>  	/* 3430ES2.0 doesn't have msecure/gpio-22 line connected to T2 */
>  	if (omap_type() == OMAP2_DEVICE_TYPE_GP &&
>  			system_rev < OMAP3430_REV_ES2_0) {
> -		u32 msecure_pad_config_reg = omap_ctrl_base_get() + 0xA3C;
> +		void __iomem *msecure_pad_config_reg = omap_ctrl_base_get() +
> +			0xA3C;
>  		int mux_mask = 0x04;
>  		u16 tmp;
>  
> @@ -144,10 +145,10 @@ static int __init msecure_init(void)
>  		 * is low. Make msecure line high in order to change the
>  		 * TWL4030 RTC time and calender registers.
>  		 */
> -		tmp = omap_readw(msecure_pad_config_reg);
> +		tmp = __raw_readw(msecure_pad_config_reg);
>  		tmp &= 0xF8; /* To enable mux mode 03/04 = GPIO_RTC */
>  		tmp |= mux_mask;/* To enable mux mode 03/04 = GPIO_RTC */
> -		omap_writew(tmp, msecure_pad_config_reg);
> +		__raw_writew(tmp, msecure_pad_config_reg);
>  
>  		gpio_direction_output(TWL4030_MSECURE_GPIO, 1);
>  	}
> diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
> index 35c03b7..96452ad 100644
> --- a/arch/arm/mach-omap2/board-ldp.c
> +++ b/arch/arm/mach-omap2/board-ldp.c
> @@ -56,7 +56,8 @@ static int __init msecure_init(void)
>  	/* 3430ES2.0 doesn't have msecure/gpio-22 line connected to T2 */
>  	if (omap_device_type() == OMAP2_DEVICE_TYPE_GP &&
>  			system_rev < OMAP3430_REV_ES2_0) {
> -		u32 msecure_pad_config_reg = omap_ctrl_base_get() + 0xA3C;
> +		void __iomem *msecure_pad_config_reg = omap_ctrl_base_get() +
> +			0xA3C;
>  		int mux_mask = 0x04;
>  		u16 tmp;
>  
> @@ -72,10 +73,10 @@ static int __init msecure_init(void)
>  		 * TWL4030 RTC time and calender registers.
>  		 */
>  
> -		tmp = omap_readw(msecure_pad_config_reg);
> +		tmp = __raw_readw(msecure_pad_config_reg);
>  		tmp &= 0xF8;	/* To enable mux mode 03/04 = GPIO_RTC */
>  		tmp |= mux_mask;/* To enable mux mode 03/04 = GPIO_RTC */
> -		omap_writew(tmp, msecure_pad_config_reg);
> +		__raw_writew(tmp, msecure_pad_config_reg);
>  
>  		gpio_direction_output(TWL4030_MSECURE_GPIO, 1);
>  	}
> -- 
> 1.6.0.1.196.g01914
> 
> --
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-10-17 21:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-30 18:46 [PATCH] omap: get rid of a useless cast Felipe Balbi
2008-10-17 21:54 ` Tony Lindgren

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.