public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <martinez.javier@gmail.com>
To: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Bill Pemberton <wfp5p@virginia.edu>,
	Arnaud Patard <apatard@mandriva.com>,
	Randy Dunlap <randy.dunlap@oracle.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org,
	Javier Martinez Canillas <martinez.javier@gmail.com>
Subject: [PATCH 1/2] Staging: xgifb: Remove CRIT[FLAGS | BEGIN | END] defines usage
Date: Sun, 20 Feb 2011 16:53:17 +0000	[thread overview]
Message-ID: <1298220798-2942-2-git-send-email-martinez.javier@gmail.com> (raw)
In-Reply-To: <1298220798-2942-1-git-send-email-martinez.javier@gmail.com>


Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
---
 drivers/staging/xgifb/XGI_accel.c |   43 ++++++++++++++++++++----------------
 1 files changed, 24 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/xgifb/XGI_accel.c b/drivers/staging/xgifb/XGI_accel.c
index 7954974..6ef2148 100644
--- a/drivers/staging/xgifb/XGI_accel.c
+++ b/drivers/staging/xgifb/XGI_accel.c
@@ -216,19 +216,21 @@ void XGIfb_syncaccel(void)
 
 int fbcon_XGI_sync(struct fb_info *info)
 {
-    if(!XGIfb_accel) return 0;
-    CRITFLAGS
+	unsigned long critflags = 0;
 
-    XGI310Sync();
+	if (!XGIfb_accel)
+		return 0;
+
+	XGI310Sync();
 
-   CRITEND
-   return 0;
+	spin_unlock_irqrestore(&xgi_video_info.lockaccel, critflags);
+	return 0;
 }
 
 void fbcon_XGI_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
 {
-   int col=0;
-   CRITFLAGS
+	int col = 0;
+	unsigned long critflags;
 
 
    if(!rect->width || !rect->height)
@@ -249,19 +251,20 @@ void fbcon_XGI_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
 	}
 
 
-	   CRITBEGIN
-	   XGI310SetupForSolidFill(col, myrops[rect->rop], 0);
-	   XGI310SubsequentSolidFillRect(rect->dx, rect->dy, rect->width, rect->height);
-	   CRITEND
-	   XGI310Sync();
+	spin_lock_irqsave(&xgi_video_info.lockaccel, critflags);
+	XGI310SetupForSolidFill(col, myrops[rect->rop], 0);
+	XGI310SubsequentSolidFillRect(rect->dx, rect->dy, rect->width,
+				      rect->height);
+	spin_unlock_irqrestore(&xgi_video_info.lockaccel, critflags);
+	XGI310Sync();
 
 
 }
 
 void fbcon_XGI_copyarea(struct fb_info *info, const struct fb_copyarea *area)
 {
-   int xdir, ydir;
-   CRITFLAGS
+	int xdir, ydir;
+	unsigned long critflags;
 
 
    if(!XGIfb_accel) {
@@ -277,11 +280,13 @@ void fbcon_XGI_copyarea(struct fb_info *info, const struct fb_copyarea *area)
    if(area->sy < area->dy) ydir = 0;
    else                    ydir = 1;
 
-      CRITBEGIN
-      XGI310SetupForScreenToScreenCopy(xdir, ydir, 3, 0, -1);
-      XGI310SubsequentScreenToScreenCopy(area->sx, area->sy, area->dx, area->dy, area->width, area->height);
-      CRITEND
-      XGI310Sync();
+	spin_lock_irqsave(&xgi_video_info.lockaccel, critflags);
+	XGI310SetupForScreenToScreenCopy(xdir, ydir, 3, 0, -1);
+	XGI310SubsequentScreenToScreenCopy(area->sx, area->sy, area->dx,
+					   area->dy, area->width,
+					   area->height);
+	spin_unlock_irqrestore(&xgi_video_info.lockaccel, critflags);
+	XGI310Sync();
 
 }
 
-- 
1.7.2.3


  reply	other threads:[~2011-02-20 16:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-20 16:53 [PATCH 0/2] Staging: xgifb: Remove CRIT[FLAGS | BEGIN | END] defines nd conditional spinlock compila Javier Martinez Canillas
2011-02-20 16:53 ` Javier Martinez Canillas [this message]
2011-02-20 17:53   ` [PATCH 1/2] Staging: xgifb: Remove CRIT[FLAGS | BEGIN | END] Dan Carpenter
2011-02-20 16:53 ` [PATCH 2/2] Staging: xgifb: Removes CRIT[FLAGS | BEGIN | END] defines and conditional spinlock compi Javier Martinez Canillas
2011-02-20 19:36 ` [PATCH 0/2] Staging: xgifb: Remove CRIT[FLAGS | BEGIN | END] aaro.koskinen

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=1298220798-2942-2-git-send-email-martinez.javier@gmail.com \
    --to=martinez.javier@gmail.com \
    --cc=apatard@mandriva.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.com \
    --cc=wfp5p@virginia.edu \
    /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