From: "Antonino A. Daplas" <adaplas@hotpop.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Linux Fbdev development list <linux-fbdev-devel@lists.sourceforge.net>
Subject: [PATCH 1/9][FBDEV]: Do the deletion of mode entries at fbdev level
Date: Sat, 21 Aug 2004 21:33:04 +0800 [thread overview]
Message-ID: <200408212042.48584.adaplas@hotpop.com> (raw)
Hi,
If a request for deletion of an entry in the mode database is requested, do
it at core fbdev level instead of doing it at the console level.
Tony
Signed-off-by: Antonino Daplas <adaplas@pol.net>
---
console/fbcon.c | 12 ++++++------
fbmem.c | 24 ++++++++++++++++--------
2 files changed, 22 insertions(+), 14 deletions(-)
diff -uprN linux-2.6.8.1-mm3-orig/drivers/video/console/fbcon.c linux-2.6.8.1-mm3/drivers/video/console/fbcon.c
--- linux-2.6.8.1-mm3-orig/drivers/video/console/fbcon.c 2004-08-21 18:26:53.000000000 +0800
+++ linux-2.6.8.1-mm3/drivers/video/console/fbcon.c 2004-08-21 18:36:27.045024320 +0800
@@ -2671,8 +2671,8 @@ static void fbcon_modechanged(struct fb_
}
}
-static void fbcon_mode_deleted(struct fb_info *info,
- struct fb_videomode *mode)
+static int fbcon_mode_deleted(struct fb_info *info,
+ struct fb_videomode *mode)
{
struct fb_info *fb_info;
struct display *p;
@@ -2694,8 +2694,7 @@ static void fbcon_mode_deleted(struct fb
break;
}
}
- if (!found)
- fb_delete_videomode(mode, &info->monspecs.modelist);
+ return found;
}
static int fbcon_event_notify(struct notifier_block *self,
@@ -2704,6 +2703,7 @@ static int fbcon_event_notify(struct not
struct fb_event *event = (struct fb_event *) data;
struct fb_info *info = event->info;
struct fb_videomode *mode;
+ int ret = 0;
switch(action) {
case FB_EVENT_SUSPEND:
@@ -2717,11 +2717,11 @@ static int fbcon_event_notify(struct not
break;
case FB_EVENT_MODE_DELETE:
mode = (struct fb_videomode *) event->data;
- fbcon_mode_deleted(info, mode);
+ ret = fbcon_mode_deleted(info, mode);
break;
}
- return 0;
+ return ret;
}
/*
diff -uprN linux-2.6.8.1-mm3-orig/drivers/video/fbmem.c linux-2.6.8.1-mm3/drivers/video/fbmem.c
--- linux-2.6.8.1-mm3-orig/drivers/video/fbmem.c 2004-08-21 18:26:53.000000000 +0800
+++ linux-2.6.8.1-mm3/drivers/video/fbmem.c 2004-08-21 18:36:27.048023864 +0800
@@ -1089,18 +1089,26 @@ fb_set_var(struct fb_info *info, struct
if (var->activate & FB_ACTIVATE_INV_MODE) {
struct fb_videomode mode1, mode2;
- struct fb_event event;
+ int ret = 0;
fb_var_to_videomode(&mode1, var);
fb_var_to_videomode(&mode2, &info->var);
/* make sure we don't delete the videomode of current var */
- if (fb_mode_is_equal(&mode1, &mode2))
- return -EINVAL;
- event.info = info;
- event.data = &mode1;
- notifier_call_chain(&fb_notifier_list, FB_EVENT_MODE_DELETE,
- &event);
- return 0;
+ ret = fb_mode_is_equal(&mode1, &mode2);
+
+ if (!ret) {
+ struct fb_event event;
+
+ event.info = info;
+ event.data = &mode1;
+ ret = notifier_call_chain(&fb_notifier_list,
+ FB_EVENT_MODE_DELETE, &event);
+ }
+
+ if (!ret)
+ fb_delete_videomode(&mode1, &info->monspecs.modelist);
+
+ return ret;
}
if ((var->activate & FB_ACTIVATE_FORCE) ||
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
reply other threads:[~2004-08-21 13:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200408212042.48584.adaplas@hotpop.com \
--to=adaplas@hotpop.com \
--cc=akpm@osdl.org \
--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).