aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorKyle McMartin <kyle@parisc-linux.org>2005-10-26 23:28:40 -0400
committerKyle McMartin <kyle@parisc-linux.org>2005-10-26 23:28:40 -0400
commite0f998930eb67c49f2862c58a45262ad0bc03eca (patch)
treed2bc6cbe11a00a05f96da01b1d4ac27adaabd546 /drivers/video
parent6958ae318bb1af5e0b77968384700fb184fb8893 (diff)
parent7a4ed937aa44acdeb8c6ba671509dc7b54b09d3a (diff)
Auto-update from upstream
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbsysfs.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/video/fbsysfs.c b/drivers/video/fbsysfs.c
index 1147b899f007..007c8e9b2b39 100644
--- a/drivers/video/fbsysfs.c
+++ b/drivers/video/fbsysfs.c
@@ -242,6 +242,13 @@ static ssize_t show_virtual(struct class_device *class_device, char *buf)
242 fb_info->var.yres_virtual); 242 fb_info->var.yres_virtual);
243} 243}
244 244
245static ssize_t show_stride(struct class_device *class_device, char *buf)
246{
247 struct fb_info *fb_info =
248 (struct fb_info *)class_get_devdata(class_device);
249 return snprintf(buf, PAGE_SIZE, "%d\n", fb_info->fix.line_length);
250}
251
245/* Format for cmap is "%02x%c%4x%4x%4x\n" */ 252/* Format for cmap is "%02x%c%4x%4x%4x\n" */
246/* %02x entry %c transp %4x red %4x blue %4x green \n */ 253/* %02x entry %c transp %4x red %4x blue %4x green \n */
247/* 256 rows at 16 chars equals 4096, the normal page size */ 254/* 256 rows at 16 chars equals 4096, the normal page size */
@@ -432,6 +439,7 @@ static struct class_device_attribute class_device_attrs[] = {
432 __ATTR(pan, S_IRUGO|S_IWUSR, show_pan, store_pan), 439 __ATTR(pan, S_IRUGO|S_IWUSR, show_pan, store_pan),
433 __ATTR(virtual_size, S_IRUGO|S_IWUSR, show_virtual, store_virtual), 440 __ATTR(virtual_size, S_IRUGO|S_IWUSR, show_virtual, store_virtual),
434 __ATTR(name, S_IRUGO, show_name, NULL), 441 __ATTR(name, S_IRUGO, show_name, NULL),
442 __ATTR(stride, S_IRUGO, show_stride, NULL),
435}; 443};
436 444
437int fb_init_class_device(struct fb_info *fb_info) 445int fb_init_class_device(struct fb_info *fb_info)