diff mbox

ARM: imx: add missing item to the list of clock event modes

Message ID 1342469226-12293-1-git-send-email-u.kleine-koenig@pengutronix.de (mailing list archive)
State New, archived
Headers show

Commit Message

Uwe Kleine-König July 16, 2012, 8:07 p.m. UTC
This prevents an out-of-bounds access to the clock_event_mode_label when
debugging.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
Hello,

I consider this to be an uncritical fix as it's only relevant with DEBUG
#defined.

Best regards
Uwe
 arch/arm/plat-mxc/time.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Sascha Hauer July 16, 2012, 9:20 p.m. UTC | #1
On Mon, Jul 16, 2012 at 10:07:06PM +0200, Uwe Kleine-König wrote:
> This prevents an out-of-bounds access to the clock_event_mode_label when
> debugging.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Applied, thanks

Sascha

> ---
> Hello,
> 
> I consider this to be an uncritical fix as it's only relevant with DEBUG
> #defined.
> 
> Best regards
> Uwe
>  arch/arm/plat-mxc/time.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/plat-mxc/time.c b/arch/arm/plat-mxc/time.c
> index 00e8e65..a17abcf 100644
> --- a/arch/arm/plat-mxc/time.c
> +++ b/arch/arm/plat-mxc/time.c
> @@ -160,7 +160,8 @@ static const char *clock_event_mode_label[] = {
>  	[CLOCK_EVT_MODE_PERIODIC] = "CLOCK_EVT_MODE_PERIODIC",
>  	[CLOCK_EVT_MODE_ONESHOT]  = "CLOCK_EVT_MODE_ONESHOT",
>  	[CLOCK_EVT_MODE_SHUTDOWN] = "CLOCK_EVT_MODE_SHUTDOWN",
> -	[CLOCK_EVT_MODE_UNUSED]   = "CLOCK_EVT_MODE_UNUSED"
> +	[CLOCK_EVT_MODE_UNUSED]   = "CLOCK_EVT_MODE_UNUSED",
> +	[CLOCK_EVT_MODE_RESUME]   = "CLOCK_EVT_MODE_RESUME",
>  };
>  #endif /* DEBUG */
>  
> -- 
> 1.7.10.4
> 
>
diff mbox

Patch

diff --git a/arch/arm/plat-mxc/time.c b/arch/arm/plat-mxc/time.c
index 00e8e65..a17abcf 100644
--- a/arch/arm/plat-mxc/time.c
+++ b/arch/arm/plat-mxc/time.c
@@ -160,7 +160,8 @@  static const char *clock_event_mode_label[] = {
 	[CLOCK_EVT_MODE_PERIODIC] = "CLOCK_EVT_MODE_PERIODIC",
 	[CLOCK_EVT_MODE_ONESHOT]  = "CLOCK_EVT_MODE_ONESHOT",
 	[CLOCK_EVT_MODE_SHUTDOWN] = "CLOCK_EVT_MODE_SHUTDOWN",
-	[CLOCK_EVT_MODE_UNUSED]   = "CLOCK_EVT_MODE_UNUSED"
+	[CLOCK_EVT_MODE_UNUSED]   = "CLOCK_EVT_MODE_UNUSED",
+	[CLOCK_EVT_MODE_RESUME]   = "CLOCK_EVT_MODE_RESUME",
 };
 #endif /* DEBUG */