From: Kronos <kronos@people.it>
To: linux-fbdev-devel@lists.sourceforge.net
Subject: Re: [PATCH][RFC][3/3] mode attribute in sysfs tree
Date: Wed, 16 Jun 2004 11:32:03 +0200 [thread overview]
Message-ID: <20040616093202.GD3556@dreamland.darkstar.lan> (raw)
In-Reply-To: <20040615172138.GA8823@dreamland.darkstar.lan>
Simple patch to show usage of the attribute with sisfb.
diff -Nru -X dontdiff linux-2.6-vanilla/drivers/video/sis/sis_main.c linux-2.6/drivers/video/sis/sis_main.c
--- linux-2.6-vanilla/drivers/video/sis/sis_main.c 2004-02-28 13:32:58.000000000 +0100
+++ linux-2.6/drivers/video/sis/sis_main.c 2004-06-12 19:21:06.000000000 +0200
@@ -4102,7 +4102,9 @@
return NULL;
}
-
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,7)
+static FB_MODE_ATTR(sis_mode_attr);
+#endif
int __init sisfb_init(void)
{
@@ -4954,6 +4956,9 @@
kfree(sis_fb_info);
return -EINVAL;
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,7)
+ class_device_create_file(sis_fb_info->class_dev, &sis_mode_attr);
+#endif
sisfb_registered = 1;
@@ -5266,6 +5271,9 @@
/* Unregister the framebuffer */
if(sisfb_registered) {
unregister_framebuffer(sis_fb_info);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,7)
+ class_device_remove_file(sis_fb_info->class_dev, &sis_mode_attr);
+#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && (defined(NEWFBDEV))
framebuffer_release(sis_fb_info);
#else
Luca
--
Home: http://kronoz.cjb.net
Collect some stars to shine for you
And start today 'cause there's only a few
A sign of times my friend
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
prev parent reply other threads:[~2004-06-16 9:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-15 17:21 [PATCH][RFC][0/3] mode attribute in sysfs tree Kronos
2004-06-16 2:43 ` Antonino A. Daplas
2004-06-16 9:28 ` [PATCH][RFC][1/3] " Kronos
2004-06-16 9:30 ` [PATCH][RFC][2/3] " Kronos
2004-06-16 9:32 ` Kronos [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040616093202.GD3556@dreamland.darkstar.lan \
--to=kronos@people.it \
--cc=linux-fbdev-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).