diff options
author | Hagen Paul Pfeifer <hagen@jauu.net> | 2010-10-26 17:22:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-26 19:52:12 -0400 |
commit | 732eacc0542d0aa48797f675888b85d6065af837 (patch) | |
tree | 53205cea4b99cc8dfed8f59438cf4214ef6546ad /drivers/video/au1200fb.c | |
parent | f27c85c56b32c42bcc54a43189c1e00fdceb23ec (diff) |
replace nested max/min macros with {max,min}3 macro
Use the new {max,min}3 macros to save some cycles and bytes on the stack.
This patch substitutes trivial nested macros with their counterpart.
Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
Cc: Joe Perches <joe@perches.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Roland Dreier <rolandd@cisco.com>
Cc: Sean Hefty <sean.hefty@intel.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/au1200fb.c')
-rw-r--r-- | drivers/video/au1200fb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/au1200fb.c b/drivers/video/au1200fb.c index e77e8e4280fb..4ea187d93768 100644 --- a/drivers/video/au1200fb.c +++ b/drivers/video/au1200fb.c | |||
@@ -1079,7 +1079,7 @@ static int au1200fb_fb_check_var(struct fb_var_screeninfo *var, | |||
1079 | * clock can only be obtain by dividing this value by an even integer. | 1079 | * clock can only be obtain by dividing this value by an even integer. |
1080 | * Fallback to a slower pixel clock if necessary. */ | 1080 | * Fallback to a slower pixel clock if necessary. */ |
1081 | pixclock = max((u32)(PICOS2KHZ(var->pixclock) * 1000), fbi->monspecs.dclkmin); | 1081 | pixclock = max((u32)(PICOS2KHZ(var->pixclock) * 1000), fbi->monspecs.dclkmin); |
1082 | pixclock = min(pixclock, min(fbi->monspecs.dclkmax, (u32)AU1200_LCD_MAX_CLK/2)); | 1082 | pixclock = min3(pixclock, fbi->monspecs.dclkmax, (u32)AU1200_LCD_MAX_CLK/2); |
1083 | 1083 | ||
1084 | if (AU1200_LCD_MAX_CLK % pixclock) { | 1084 | if (AU1200_LCD_MAX_CLK % pixclock) { |
1085 | int diff = AU1200_LCD_MAX_CLK % pixclock; | 1085 | int diff = AU1200_LCD_MAX_CLK % pixclock; |