aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/maxinefb.c
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
commitada47b5fe13d89735805b566185f4885f5a3f750 (patch)
tree644b88f8a71896307d71438e9b3af49126ffb22b /drivers/video/maxinefb.c
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/video/maxinefb.c')
-rw-r--r--drivers/video/maxinefb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/video/maxinefb.c b/drivers/video/maxinefb.c
index 5e91c2b30af9..5cf52d3c8e75 100644
--- a/drivers/video/maxinefb.c
+++ b/drivers/video/maxinefb.c
@@ -28,7 +28,6 @@
28#include <linux/errno.h> 28#include <linux/errno.h>
29#include <linux/string.h> 29#include <linux/string.h>
30#include <linux/mm.h> 30#include <linux/mm.h>
31#include <linux/slab.h>
32#include <linux/delay.h> 31#include <linux/delay.h>
33#include <linux/init.h> 32#include <linux/init.h>
34#include <linux/fb.h> 33#include <linux/fb.h>
@@ -92,6 +91,9 @@ static int maxinefb_setcolreg(unsigned regno, unsigned red, unsigned green,
92 /* value to be written into the palette reg. */ 91 /* value to be written into the palette reg. */
93 unsigned long hw_colorvalue = 0; 92 unsigned long hw_colorvalue = 0;
94 93
94 if (regno > 255)
95 return 1;
96
95 red >>= 8; /* The cmap fields are 16 bits */ 97 red >>= 8; /* The cmap fields are 16 bits */
96 green >>= 8; /* wide, but the harware colormap */ 98 green >>= 8; /* wide, but the harware colormap */
97 blue >>= 8; /* registers are only 8 bits wide */ 99 blue >>= 8; /* registers are only 8 bits wide */