Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5530
b: refs/heads/master
c: 02459ea
h: refs/heads/master
v: v3
  • Loading branch information
James Simmons authored and Linus Torvalds committed Jul 31, 2005
1 parent 3ca5fda commit 7bbac2b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f0098f7863f814a5adc0b9cb271605d063cad7fa
refs/heads/master: 02459eaab98a6a57717bc0cacede148fc76af881
8 changes: 8 additions & 0 deletions trunk/drivers/video/fbsysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,13 @@ static ssize_t show_pan(struct class_device *class_device, char *buf)
fb_info->var.xoffset);
}

static ssize_t show_name(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, "%s\n", fb_info->fix.id);
}

static struct class_device_attribute class_device_attrs[] = {
__ATTR(bits_per_pixel, S_IRUGO|S_IWUSR, show_bpp, store_bpp),
__ATTR(blank, S_IRUGO|S_IWUSR, show_blank, store_blank),
Expand All @@ -424,6 +431,7 @@ static struct class_device_attribute class_device_attrs[] = {
__ATTR(modes, S_IRUGO|S_IWUSR, show_modes, store_modes),
__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),
};

int fb_init_class_device(struct fb_info *fb_info)
Expand Down

0 comments on commit 7bbac2b

Please sign in to comment.