From: Michal Januszewski Date: Wed, 27 Jul 2005 18:46:08 +0000 (-0700) Subject: [PATCH] fbdev: update info->cmap when setting cmap from user-/kernelspace. X-Git-Tag: v2.6.13-rc4~25^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03e259a9cdbd0583e71468293aaa1ccadbdaeff1;p=pandora-kernel.git [PATCH] fbdev: update info->cmap when setting cmap from user-/kernelspace. The fb_info struct, as defined in include/linux/fb.h, contains an element that is supposed to hold the current color map: struct fb_cmap cmap; /* Current cmap */ This cmap is currently never updated when either fb_set_cmap() or fb_set_user_cmap() are called. As a result, info->cmap contains the default cmap that was set by a device driver/fbcon and a userspace application using the FBIOGETCMAP ioctl will not always get the *currently* used color map. The patch fixes this by making sure the cmap is copied to info->cmap after it is set correctly. It moves most of the code that is responsible for setting the cmap to fb_set_cmap() and out of fb_set_user_cmap() to avoid code-duplication. Signed-off-by: Michal Januszewski Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed