All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] cli()/sti()-removal
@ 2005-04-27 19:52 
  2005-04-27 20:02 ` Benoit Boissinot
  0 siblings, 1 reply; 2+ messages in thread
From:  @ 2005-04-27 19:52 UTC (permalink / raw)
  To: kernel-janitors

 
 
--- linux-2.6.11.7/drivers/net/irda/ep7211_ir.c.orig	2005-04-27 17:41:36.000000000 +0100 
+++ linux-2.6.11.7/drivers/net/irda/ep7211_ir.c	2005-04-27 17:53:33.000000000 +0100 
@@ -14,6 +14,7 @@ 
 
 #include <asm/io.h> 
 #include <asm/hardware.h> 
+#include<asm/spinlock.h> 
 
 #define MIN_DELAY 25      /* 15 us, but wait a little more to be sure */ 
 #define MAX_DELAY 10000   /* 1 ms */ 
@@ -22,7 +23,7 @@ static void ep7211_ir_open(dongle_t *sel 
 static void ep7211_ir_close(dongle_t *self); 
 static int  ep7211_ir_change_speed(struct irda_task *task); 
 static int  ep7211_ir_reset(struct irda_task *task); 
- 
+static spinlock_t driver_lock = SPIN_LOCK_UNLOCKED; 
 static struct dongle_reg dongle = { 
 	.type = IRDA_EP7211_IR, 
 	.open = ep7211_ir_open, 
@@ -35,8 +36,8 @@ static struct dongle_reg dongle = { 
 static void ep7211_ir_open(dongle_t *self, struct qos_info *qos) 
 { 
 	unsigned int syscon1, flags; 
- 
-	save_flags(flags); cli(); 
+ 
+	spin_lock_irqsave(&driver_lock,flags); 
 
 	/* Turn on the SIR encoder. */ 
 	syscon1 = clps_readl(SYSCON1); 
@@ -46,14 +47,14 @@ static void ep7211_ir_open(dongle_t *sel 
 	/* XXX: We should disable modem status interrupts on the first 
 		UART (interrupt #14). */ 
 
-	restore_flags(flags); 
+	spin_unlock_irqrestore(&driver_lock,flags); 
 } 
 
 static void ep7211_ir_close(dongle_t *self) 
 { 
 	unsigned int syscon1, flags; 
 
-	save_flags(flags); cli(); 
+	spin_lock_irqsave(&driver_lock,flags); 
 
 	/* Turn off the SIR encoder. */ 
 	syscon1 = clps_readl(SYSCON1); 
@@ -63,7 +64,7 @@ static void ep7211_ir_close(dongle_t *se 
 	/* XXX: If we've disabled the modem status interrupts, we should 
 		reset them back to their original state. */ 
 
-	restore_flags(flags); 
+	spin_unlock_irqrestore(&driver_lock,flags); 
 } 
 
 /* 
 
************************ ADSL JUSQU'A 8 MEGA + 3 MOIS DE TELEPHONE GRATUIT ************************
L'ultra haut débit à 15EUR/mois seulement ! Et vous téléphonez gratuitement en France vers les postes fixes,
hors numéros spéciaux pendant 3 mois.
Pour profiter de cette offre exceptionnelle, cliquez ici : http://register.tiscali.fr/adsl/  (voir conditions sur le site)



_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [KJ] cli()/sti()-removal
  2005-04-27 19:52 [KJ] cli()/sti()-removal 
@ 2005-04-27 20:02 ` Benoit Boissinot
  0 siblings, 0 replies; 2+ messages in thread
From: Benoit Boissinot @ 2005-04-27 20:02 UTC (permalink / raw)
  To: kernel-janitors

On 4/27/05, david.chosrova@libertysurf.fr <david.chosrova@libertysurf.fr> wrote:
> 
> 
> --- linux-2.6.11.7/drivers/net/irda/ep7211_ir.c.orig    2005-04-27 17:41:36.000000000 +0100
> +++ linux-2.6.11.7/drivers/net/irda/ep7211_ir.c 2005-04-27 17:53:33.000000000 +0100
> @@ -14,6 +14,7 @@
> 
>  #include <asm/io.h>
>  #include <asm/hardware.h>
> +#include<asm/spinlock.h>
> 
>  #define MIN_DELAY 25      /* 15 us, but wait a little more to be sure */
>  #define MAX_DELAY 10000   /* 1 ms */
> @@ -22,7 +23,7 @@ static void ep7211_ir_open(dongle_t *sel
>  static void ep7211_ir_close(dongle_t *self);
>  static int  ep7211_ir_change_speed(struct irda_task *task);
>  static int  ep7211_ir_reset(struct irda_task *task);
> -
> +static spinlock_t driver_lock = SPIN_LOCK_UNLOCKED;

spin_lock_init(driver_lock)
(cf TODO)

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-04-27 20:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-27 19:52 [KJ] cli()/sti()-removal 
2005-04-27 20:02 ` Benoit Boissinot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.