diff options
| author | Sandor Yu <R01008@freescale.com> | 2014-02-07 22:35:22 -0500 |
|---|---|---|
| committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 09:57:24 -0400 |
| commit | 8ed45225e0a244200550a769d8f9d43040ef9e24 (patch) | |
| tree | bb4b7fc23ee17234dd9769851910411df2e9c42b /drivers/mfd | |
| parent | d3857c81079c3b863d7ce132490cbdf4961e6015 (diff) | |
ENGR00298274 hdmi: add zero check for hdmi audio pixel clock setting
Pixel clock may not initialized in the struct of fb_var_screeninfo
when video mode timing setting by user.
Add pixel clock zero check in hdmi audio clock update function
to avoid division by zero.
Signed-off-by: Sandor Yu <R01008@freescale.com>
Diffstat (limited to 'drivers/mfd')
| -rw-r--r-- | drivers/mfd/mxc-hdmi-core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mfd/mxc-hdmi-core.c b/drivers/mfd/mxc-hdmi-core.c index 2b0853c0375d..52dc5ef665b5 100644 --- a/drivers/mfd/mxc-hdmi-core.c +++ b/drivers/mfd/mxc-hdmi-core.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) 2011-2013 Freescale Semiconductor, Inc. | 2 | * Copyright (C) 2011-2014 Freescale Semiconductor, Inc. |
| 3 | * | 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
| @@ -547,6 +547,8 @@ EXPORT_SYMBOL(hdmi_init_clk_regenerator); | |||
| 547 | void hdmi_clk_regenerator_update_pixel_clock(u32 pixclock) | 547 | void hdmi_clk_regenerator_update_pixel_clock(u32 pixclock) |
| 548 | { | 548 | { |
| 549 | 549 | ||
| 550 | if (!pixclock) | ||
| 551 | return; | ||
| 550 | /* Translate pixel clock in ps (pico seconds) to Hz */ | 552 | /* Translate pixel clock in ps (pico seconds) to Hz */ |
| 551 | pixel_clk_rate = PICOS2KHZ(pixclock) * 1000UL; | 553 | pixel_clk_rate = PICOS2KHZ(pixclock) * 1000UL; |
| 552 | hdmi_set_clk_regenerator(); | 554 | hdmi_set_clk_regenerator(); |
