summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbsysfs.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-10-27 20:56:43 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-10-27 20:56:43 -0400
commitcb650116a030dd5cf12f30651e29ceb990d42e4a (patch)
tree6cac1c4ea615d1a3893f82a4c950623b38421872 /drivers/video/fbsysfs.c
parent7bbaa75452c77cbaa016b987765c5d6c8b744587 (diff)
parent741b2252a5e14d6c60a913c77a6099abe73a854a (diff)
downloadblackbird-op-linux-cb650116a030dd5cf12f30651e29ceb990d42e4a.tar.gz
blackbird-op-linux-cb650116a030dd5cf12f30651e29ceb990d42e4a.zip
Merge branch 'master'
Diffstat (limited to 'drivers/video/fbsysfs.c')
-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)
fb_info->var.yres_virtual);
}
+static ssize_t show_stride(struct class_device *class_device, char *buf)
+{
+ struct fb_info *fb_info =
+ (struct fb_info *)class_get_devdata(class_device);
+ return snprintf(buf, PAGE_SIZE, "%d\n", fb_info->fix.line_length);
+}
+
/* Format for cmap is "%02x%c%4x%4x%4x\n" */
/* %02x entry %c transp %4x red %4x blue %4x green \n */
/* 256 rows at 16 chars equals 4096, the normal page size */
@@ -432,6 +439,7 @@ static struct class_device_attribute class_device_attrs[] = {
__ATTR(pan, S_IRUGO|S_IWUSR, show_pan, store_pan),
__ATTR(virtual_size, S_IRUGO|S_IWUSR, show_virtual, store_virtual),
__ATTR(name, S_IRUGO, show_name, NULL),
+ __ATTR(stride, S_IRUGO, show_stride, NULL),
};
int fb_init_class_device(struct fb_info *fb_info)
OpenPOWER on IntegriCloud