kernels/linux-2.4.0/drivers/video/riva/fbdev.c
/**
 * riva_getcolreg
 * @regno:
 * @red:
 * @green:
 * @blue:
 * @transp:
 * @info: pointer to rivafb_info object containing info for current riva board
 *
 * DESCRIPTION:
 * Read a single color register and split it into colors/transparent.
 * The return values must have a 16 bit magnitude.
 * Return != 0 for invalid regno.
 *
 * CALLED FROM:
 * fbcmap.c:fb_get_cmap()
 *	fbgen.c:fbgen_get_cmap()
 *	fbgen.c:fbgen_switch()
 */


Read a single color register and split it into colors/transparent.
The return values must have a 16 bit magnitude.
Return != 0 for invalid regno.


Read a single color register and split it into colors / transparent . The return values must have a 16 bit magnitude . Return ! = 0 for invalid regno .
static int riva_getcolreg (unsigned regno, unsigned *red, unsigned *green,
			   unsigned *blue, unsigned *transp,
			   struct fb_info *info)
{
	struct rivafb_info *rivainfo = (struct rivafb_info *) info;
	if (regno >= riva_get_cmap_len(&rivainfo->currcon_display->var))
		return 1;
	*red = rivainfo->palette[regno].red;
	*green = rivainfo->palette[regno].green;
	*blue = rivainfo->palette[regno].blue;
	*transp = 0;
	return 0;
}
static int riva_getcolreg ( unsigned regno , unsigned * red , unsigned * green , unsigned * blue , unsigned * transp , struct fb_info * info ) { struct rivafb_info * rivainfo = ( struct rivafb_info * ) info ; if ( regno >= riva_get_cmap_len ( & rivainfo -> currcon_display -> var ) ) return 1 ; * red = rivainfo -> palette [ regno ] . red ; * green = rivainfo -> palette [ regno ] . green ; * blue = rivainfo -> palette [ regno ] . blue ; * transp = 0 ; return 0 ; }
riva_getcolreg
 @regno:
 @red:
 @green:
 @blue:
 @transp:
 @info: pointer to rivafb_info object containing info for current riva board
riva_getcolreg @regno : @red : @green : @blue : @transp : @info : pointer to rivafb_info object containing info for current riva board