From: Javier Martinez Canillas Date: Mon, 21 Feb 2011 09:09:07 +0000 (+0100) Subject: Staging: xgifb: Remove unused spinlock conditional compilation logic X-Git-Tag: MMI-PSA29.97-13-9~20521^2~432 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c73d0d55069b94630338bfeeae6d8149770e0451;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Staging: xgifb: Remove unused spinlock conditional compilation logic 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 Acked-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/xgifb/XGI_accel.c b/drivers/staging/xgifb/XGI_accel.c index e6241fed04fa..7c69e0711a90 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 5a0395bef2f2..3087e907121c 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 -#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 */