소스 검색

ARM: OMAP: Remove unwanted type casts and fix the compiler warning.

This patch fixes the compiler warning "assignment from incompatible
pointer type"  in dmtimer.c and removes the tye casts. These warnings
were suppressed by type catsing.

The proposed fix was suggested by Russell King <rmk+kernel@arm.linux.org.uk>

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Santosh Shilimkar 16 년 전
부모
커밋
aea2a5b03c
1개의 변경된 파일7개의 추가작업 그리고 7개의 파일을 삭제
  1. 7 7
      arch/arm/plat-omap/dmtimer.c

+ 7 - 7
arch/arm/plat-omap/dmtimer.c

@@ -214,7 +214,7 @@ static const char *omap2_dm_source_names[] __initdata = {
 	NULL
 	NULL
 };
 };
 
 
-static struct clk **omap2_dm_source_clocks[3];
+static struct clk *omap2_dm_source_clocks[3];
 static const int dm_timer_count = ARRAY_SIZE(omap2_dm_timers);
 static const int dm_timer_count = ARRAY_SIZE(omap2_dm_timers);
 
 
 #elif defined(CONFIG_ARCH_OMAP3)
 #elif defined(CONFIG_ARCH_OMAP3)
@@ -247,7 +247,7 @@ static const char *omap3_dm_source_names[] __initdata = {
 	NULL
 	NULL
 };
 };
 
 
-static struct clk **omap3_dm_source_clocks[2];
+static struct clk *omap3_dm_source_clocks[2];
 static const int dm_timer_count = ARRAY_SIZE(omap3_dm_timers);
 static const int dm_timer_count = ARRAY_SIZE(omap3_dm_timers);
 
 
 #else
 #else
@@ -257,7 +257,7 @@ static const int dm_timer_count = ARRAY_SIZE(omap3_dm_timers);
 #endif
 #endif
 
 
 static struct omap_dm_timer *dm_timers;
 static struct omap_dm_timer *dm_timers;
-static char **dm_source_names;
+static const char **dm_source_names;
 static struct clk **dm_source_clocks;
 static struct clk **dm_source_clocks;
 
 
 static spinlock_t dm_timer_lock;
 static spinlock_t dm_timer_lock;
@@ -705,12 +705,12 @@ int __init omap_dm_timer_init(void)
 		dm_timers = omap1_dm_timers;
 		dm_timers = omap1_dm_timers;
 	else if (cpu_is_omap24xx()) {
 	else if (cpu_is_omap24xx()) {
 		dm_timers = omap2_dm_timers;
 		dm_timers = omap2_dm_timers;
-		dm_source_names = (char **)omap2_dm_source_names;
-		dm_source_clocks = (struct clk **)omap2_dm_source_clocks;
+		dm_source_names = omap2_dm_source_names;
+		dm_source_clocks = omap2_dm_source_clocks;
 	} else if (cpu_is_omap34xx()) {
 	} else if (cpu_is_omap34xx()) {
 		dm_timers = omap3_dm_timers;
 		dm_timers = omap3_dm_timers;
-		dm_source_names = (char **)omap3_dm_source_names;
-		dm_source_clocks = (struct clk **)omap3_dm_source_clocks;
+		dm_source_names = omap3_dm_source_names;
+		dm_source_clocks = omap3_dm_source_clocks;
 	}
 	}
 
 
 	if (cpu_class_is_omap2())
 	if (cpu_class_is_omap2())