/* Set a single color register. Return != 0 for invalid regno.  */
static int g364fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, u_int transp, struct fb_info *info)
/* Set a single color register. Return != 0 for invalid regno.  */
static int g364fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, u_int transp, struct fb_info *info)
{
	volatile unsigned int *ptr = (volatile unsigned int *) CLR_PAL_REG;
	if (regno > 255)
		return 1;
	red >>= 8;
	green >>= 8;
	blue >>= 8;
	ptr[regno << 1] = (red << 16) | (green << 8) | blue;
	return 0;
}