/* Set a single color register. The values supplied are already rounded down to the hardware's capabilities (according to the entries in the var structure). Return != 0 for invalid regno.  */
static int fm2fb_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. The values supplied are already rounded down to the hardware's capabilities (according to the entries in the var structure). Return != 0 for invalid regno.  */
static int fm2fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, u_int transp, struct fb_info *info)
{
	if (regno < 16) {
		red >>= 8;
		green >>= 8;
		blue >>= 8;
		((u32*)(info->pseudo_palette))[regno] = (red << 16) |
			(green << 8) | blue;
	}
	return 0;
}