aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-07-21 02:30:57 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-01-04 19:20:09 -0500
commitfd1126cac093f626e412c0419c763ea3ee304dfe (patch)
treee97cc7fcd1fb0c0823b6469f821f5ffa57599c74 /drivers/media/common
parent8c64f93285e81e7595d169aac9636d215ba5bcb7 (diff)
[media] mt2063: Use linux default max function
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common')
-rw-r--r--drivers/media/common/tuners/mt2063.c34
1 files changed, 3 insertions, 31 deletions
diff --git a/drivers/media/common/tuners/mt2063.c b/drivers/media/common/tuners/mt2063.c
index 6c73bfd31c47..86620073c174 100644
--- a/drivers/media/common/tuners/mt2063.c
+++ b/drivers/media/common/tuners/mt2063.c
@@ -953,34 +953,6 @@ static u32 MT2063_gcd(u32 u, u32 v)
953 953
954/**************************************************************************** 954/****************************************************************************
955** 955**
956** Name: umax
957**
958** Description: Implements a simple maximum function for unsigned numbers.
959** Implemented as a function rather than a macro to avoid
960** multiple evaluation of the calling parameters.
961**
962** Parameters: a, b - Values to be compared
963**
964** Global: None
965**
966** Returns: larger of the input values.
967**
968** Dependencies: None.
969**
970** Revision History:
971**
972** SCR Date Author Description
973** -------------------------------------------------------------------------
974** N/A 06-02-2004 JWS Original
975**
976****************************************************************************/
977static u32 MT2063_umax(u32 a, u32 b)
978{
979 return (a >= b) ? a : b;
980}
981
982/****************************************************************************
983**
984** Name: IsSpurInBand 956** Name: IsSpurInBand
985** 957**
986** Description: Checks to see if a spur will be present within the IF's 958** Description: Checks to see if a spur will be present within the IF's
@@ -1037,11 +1009,11 @@ static u32 IsSpurInBand(struct MT2063_AvoidSpursData_t *pAS_Info,
1037 ** gcd-based scale factor or f_Scale. 1009 ** gcd-based scale factor or f_Scale.
1038 */ 1010 */
1039 lo_gcd = MT2063_gcd(f_LO1, f_LO2); 1011 lo_gcd = MT2063_gcd(f_LO1, f_LO2);
1040 gd_Scale = MT2063_umax((u32) MT2063_gcd(lo_gcd, d), f_Scale); 1012 gd_Scale = max((u32) MT2063_gcd(lo_gcd, d), f_Scale);
1041 hgds = gd_Scale / 2; 1013 hgds = gd_Scale / 2;
1042 gc_Scale = MT2063_umax((u32) MT2063_gcd(lo_gcd, c), f_Scale); 1014 gc_Scale = max((u32) MT2063_gcd(lo_gcd, c), f_Scale);
1043 hgcs = gc_Scale / 2; 1015 hgcs = gc_Scale / 2;
1044 gf_Scale = MT2063_umax((u32) MT2063_gcd(lo_gcd, f), f_Scale); 1016 gf_Scale = max((u32) MT2063_gcd(lo_gcd, f), f_Scale);
1045 hgfs = gf_Scale / 2; 1017 hgfs = gf_Scale / 2;
1046 1018
1047 n0 = DIV_ROUND_UP(f_LO2 - d, f_LO1 - f_LO2); 1019 n0 = DIV_ROUND_UP(f_LO2 - d, f_LO1 - f_LO2);