diff options
author | Antonino A. Daplas <adaplas@gmail.com> | 2006-06-26 03:27:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 12:58:32 -0400 |
commit | 9a17917671d407d37bf23a527aa55acca3cb4735 (patch) | |
tree | 1e78f6f82d913ee58c174776529589afe1d3b2a9 /drivers/video/fbsysfs.c | |
parent | a06630f3e7fb29f2524e1d7b009eb8b5a278ba23 (diff) |
[PATCH] Detaching fbcon: sdd sysfs class device entry for fbcon
In order for this feature to work, an interface will be needed. The most
appropriate is sysfs. However, the framebuffer console has no sysfs entry
yet. This will create a sysfs class device entry for fbcon under
/sys/class/graphics.
Add a class_device entry 'fbcon' under class 'graphics'. Console-specific
attributes which where previously under class/graphics/fb[x] are moved to
class/graphics/fbcon. These attributes, 'con_rotate' and 'con_rotate_all',
are also renamed to 'rotate' and 'rotate_all' respectively.
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/fbsysfs.c')
-rw-r--r-- | drivers/video/fbsysfs.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/drivers/video/fbsysfs.c b/drivers/video/fbsysfs.c index 6de02189abbe..4f78f234473d 100644 --- a/drivers/video/fbsysfs.c +++ b/drivers/video/fbsysfs.c | |||
@@ -247,45 +247,6 @@ static ssize_t show_rotate(struct class_device *class_device, char *buf) | |||
247 | return snprintf(buf, PAGE_SIZE, "%d\n", fb_info->var.rotate); | 247 | return snprintf(buf, PAGE_SIZE, "%d\n", fb_info->var.rotate); |
248 | } | 248 | } |
249 | 249 | ||
250 | static ssize_t store_con_rotate(struct class_device *class_device, | ||
251 | const char *buf, size_t count) | ||
252 | { | ||
253 | struct fb_info *fb_info = class_get_devdata(class_device); | ||
254 | int rotate; | ||
255 | char **last = NULL; | ||
256 | |||
257 | acquire_console_sem(); | ||
258 | rotate = simple_strtoul(buf, last, 0); | ||
259 | fb_con_duit(fb_info, FB_EVENT_SET_CON_ROTATE, &rotate); | ||
260 | release_console_sem(); | ||
261 | return count; | ||
262 | } | ||
263 | |||
264 | static ssize_t store_con_rotate_all(struct class_device *class_device, | ||
265 | const char *buf, size_t count) | ||
266 | { | ||
267 | struct fb_info *fb_info = class_get_devdata(class_device); | ||
268 | int rotate; | ||
269 | char **last = NULL; | ||
270 | |||
271 | acquire_console_sem(); | ||
272 | rotate = simple_strtoul(buf, last, 0); | ||
273 | fb_con_duit(fb_info, FB_EVENT_SET_CON_ROTATE_ALL, &rotate); | ||
274 | release_console_sem(); | ||
275 | return count; | ||
276 | } | ||
277 | |||
278 | static ssize_t show_con_rotate(struct class_device *class_device, char *buf) | ||
279 | { | ||
280 | struct fb_info *fb_info = class_get_devdata(class_device); | ||
281 | int rotate; | ||
282 | |||
283 | acquire_console_sem(); | ||
284 | rotate = fb_con_duit(fb_info, FB_EVENT_GET_CON_ROTATE, NULL); | ||
285 | release_console_sem(); | ||
286 | return snprintf(buf, PAGE_SIZE, "%d\n", rotate); | ||
287 | } | ||
288 | |||
289 | static ssize_t store_virtual(struct class_device *class_device, | 250 | static ssize_t store_virtual(struct class_device *class_device, |
290 | const char * buf, size_t count) | 251 | const char * buf, size_t count) |
291 | { | 252 | { |
@@ -502,8 +463,6 @@ static struct class_device_attribute class_device_attrs[] = { | |||
502 | __ATTR(name, S_IRUGO, show_name, NULL), | 463 | __ATTR(name, S_IRUGO, show_name, NULL), |
503 | __ATTR(stride, S_IRUGO, show_stride, NULL), | 464 | __ATTR(stride, S_IRUGO, show_stride, NULL), |
504 | __ATTR(rotate, S_IRUGO|S_IWUSR, show_rotate, store_rotate), | 465 | __ATTR(rotate, S_IRUGO|S_IWUSR, show_rotate, store_rotate), |
505 | __ATTR(con_rotate, S_IRUGO|S_IWUSR, show_con_rotate, store_con_rotate), | ||
506 | __ATTR(con_rotate_all, S_IWUSR, NULL, store_con_rotate_all), | ||
507 | __ATTR(state, S_IRUGO|S_IWUSR, show_fbstate, store_fbstate), | 466 | __ATTR(state, S_IRUGO|S_IWUSR, show_fbstate, store_fbstate), |
508 | #ifdef CONFIG_FB_BACKLIGHT | 467 | #ifdef CONFIG_FB_BACKLIGHT |
509 | __ATTR(bl_curve, S_IRUGO|S_IWUSR, show_bl_curve, store_bl_curve), | 468 | __ATTR(bl_curve, S_IRUGO|S_IWUSR, show_bl_curve, store_bl_curve), |