From: Javier Martinez Canillas <martinez.javier@gmail.com>
To: kernel-janitors@vger.kernel.org
Subject: [PATCH 3/3] Staging: xgifb: Remove unused spinlock conditional compilation logic
Date: Mon, 21 Feb 2011 09:09:07 +0000 [thread overview]
Message-ID: <1298279347-8825-4-git-send-email-martinez.javier@gmail.com> (raw)
xgifb staging driver for XG20, XG21, XG40, XG42 frame buffer device
has a accelerator engine that never get used (XGIfb_accel is always 0).
Also the driver has a set of defines that hides the synchronization
mechanism used to access critical sections and a way to disable spinlocks
use at compile time.
In a earlier patch all the code that depends on the accelerator being active
was deleted because it was dead code. Since the only usage of this
synchronization defines were in that dead code, this patch removes all the
now unused spinlock conditional compilation logic.
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
---
drivers/staging/xgifb/XGI_accel.c | 3 ---
drivers/staging/xgifb/XGI_accel.h | 14 --------------
2 files changed, 0 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/xgifb/XGI_accel.c b/drivers/staging/xgifb/XGI_accel.c
index e6241fe..7c69e07 100644
--- a/drivers/staging/xgifb/XGI_accel.c
+++ b/drivers/staging/xgifb/XGI_accel.c
@@ -105,9 +105,6 @@ XGI310Sync(void)
int XGIfb_initaccel(void)
{
-#ifdef XGIFB_USE_SPINLOCKS
- spin_lock_init(&xgi_video_info.lockaccel);
-#endif
return(0);
}
diff --git a/drivers/staging/xgifb/XGI_accel.h b/drivers/staging/xgifb/XGI_accel.h
index 5a0395b..3087e90 100644
--- a/drivers/staging/xgifb/XGI_accel.h
+++ b/drivers/staging/xgifb/XGI_accel.h
@@ -18,20 +18,6 @@
#ifndef _XGIFB_ACCEL_H
#define _XGIFB_ACCEL_H
-/* Guard accelerator accesses with spin_lock_irqsave? Works well without. */
-#undef XGIFB_USE_SPINLOCKS
-
-#ifdef XGIFB_USE_SPINLOCKS
-#include <linux/spinlock.h>
-#define CRITBEGIN spin_lock_irqsave(&xgi_video_info.lockaccel), critflags);
-#define CRITEND spin_unlock_irqrestore(&xgi_video_info.lockaccel), critflags);
-#define CRITFLAGS unsigned long critflags;
-#else
-#define CRITBEGIN
-#define CRITEND
-#define CRITFLAGS
-#endif
-
/* Definitions for the XGI engine communication. */
#define PATREGSIZE 384 /* Pattern register size. 384 bytes @ 0x8300 */
--
1.7.0.4
next reply other threads:[~2011-02-21 9:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-21 9:09 Javier Martinez Canillas [this message]
2011-02-21 17:16 ` [PATCH 3/3] Staging: xgifb: Remove unused function fbcon_XGI_sync Javier Martinez Canillas
2011-02-21 17:26 ` [PATCH 3/3] Staging: xgifb: Remove unused function Dan Carpenter
2011-02-21 17:32 ` [PATCH 3/3] Staging: xgifb: Remove unused function fbcon_XGI_sync Javier Martinez Canillas
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=1298279347-8825-4-git-send-email-martinez.javier@gmail.com \
--to=martinez.javier@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
/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