Re: Patch to add mode setting to sysfs
From: James Simmons <hidden>
Date: 2005-02-17 22:13:43
On Thu, 17 Feb 2005 21:50:16 +0800, Antonino A. Daplas [off-list ref] wrote:quoted
Instead of hardcoding some of the fields in var, why not copy it from the current var? Ie: var = info->var; fb_videomode_to_var(&var, mode);I added this change, plus more robust error handing. Add attributes for virtual resolution and bpp. I also fixed fb so that it works as module.
Seperate the make fbdev modular into another patch. Also I have a feeling
that will open a whole new can of worms. Also please create something
like
static struct attribute *frame_attrs[] = {
&class_device_attr_dev.attr,
&class_device_attr_name.attr,
NULL
};
and do
for (i = 0; i < ARRAY_SIZE(frame_class_device_attributes); i++) {
rc = class_device_create_file(&info->class_dev, frame_class_device_attributes[i]);
if (unlikely(rc)) {
/* Not fatal */
printk(KERN_WARNING "Unable to create device file for framebuffer %d\n", info->node);
}
}
Did you see me email with my ideas about the sysfs structure?
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click