* Show the name of the fbdev device
@ 2005-07-27 22:23 James Simmons
2005-07-28 8:01 ` Antonino A. Daplas
0 siblings, 1 reply; 2+ messages in thread
From: James Simmons @ 2005-07-27 22:23 UTC (permalink / raw)
To: Linux Fbdev development list; +Cc: Antonino A. Daplas, Geert Uytterhoeven
Show the name of the fbdev device in sysfs. Has been tested.
--- linus-2.6/drivers/video/fbsysfs.c 2005-07-11 10:07:21.000000000 -0700
+++ fbdev-2.6/drivers/video/fbsysfs.c 2005-07-21 08:47:17.000000000 -0700
@@ -352,6 +351,13 @@
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),
@@ -362,6 +368,7 @@
__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)
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Show the name of the fbdev device
2005-07-27 22:23 Show the name of the fbdev device James Simmons
@ 2005-07-28 8:01 ` Antonino A. Daplas
0 siblings, 0 replies; 2+ messages in thread
From: Antonino A. Daplas @ 2005-07-28 8:01 UTC (permalink / raw)
To: linux-fbdev-devel; +Cc: Antonino A. Daplas, Geert Uytterhoeven
James Simmons wrote:
> Show the name of the fbdev device in sysfs. Has been tested.
Care to add a Signed-off-by: line?
Tony
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-07-28 8:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-27 22:23 Show the name of the fbdev device James Simmons
2005-07-28 8:01 ` Antonino A. Daplas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).