aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/ep93xx-fb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/ep93xx-fb.c')
-rw-r--r--drivers/video/ep93xx-fb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/ep93xx-fb.c b/drivers/video/ep93xx-fb.c
index bd9d46f95291..0c99de0562ca 100644
--- a/drivers/video/ep93xx-fb.c
+++ b/drivers/video/ep93xx-fb.c
@@ -19,6 +19,7 @@
19 19
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <linux/dma-mapping.h> 21#include <linux/dma-mapping.h>
22#include <linux/slab.h>
22#include <linux/clk.h> 23#include <linux/clk.h>
23#include <linux/fb.h> 24#include <linux/fb.h>
24 25
@@ -358,6 +359,8 @@ static int ep93xxfb_setcolreg(unsigned int regno, unsigned int red,
358 359
359 switch (info->fix.visual) { 360 switch (info->fix.visual) {
360 case FB_VISUAL_PSEUDOCOLOR: 361 case FB_VISUAL_PSEUDOCOLOR:
362 if (regno > 255)
363 return 1;
361 rgb = ((red & 0xff00) << 8) | (green & 0xff00) | 364 rgb = ((red & 0xff00) << 8) | (green & 0xff00) |
362 ((blue & 0xff00) >> 8); 365 ((blue & 0xff00) >> 8);
363 366