* [PATCH 4/5] IrDA: sti/cli removal from EP7211 IrDA driver
@ 2006-02-13 22:15 Samuel Ortiz
2006-02-19 8:36 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: Samuel Ortiz @ 2006-02-13 22:15 UTC (permalink / raw)
To: ext David S. Miller
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Jean Tourrilhes, IrDA users
This patch replaces the deprecated sti/cli routines with the corresponding
spin_lock ones.
Signed-off-by: David chosrova <david.chosrova-TDf4sKD1mxeHlu7OokbhRg@public.gmane.org>
Signed-off-by: Samuel Ortiz <samuel.ortiz-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
diff --git a/drivers/net/irda/ep7211_ir.c b/drivers/net/irda/ep7211_ir.c
index 3189626..4cba38f 100644
--- a/drivers/net/irda/ep7211_ir.c
+++ b/drivers/net/irda/ep7211_ir.c
@@ -8,6 +8,7 @@
#include <linux/delay.h>
#include <linux/tty.h>
#include <linux/init.h>
+#include <linux/spinlock.h>
#include <net/irda/irda.h>
#include <net/irda/irda_device.h>
@@ -23,6 +24,8 @@ static void ep7211_ir_close(dongle_t *se
static int ep7211_ir_change_speed(struct irda_task *task);
static int ep7211_ir_reset(struct irda_task *task);
+static DEFINE_SPINLOCK(ep7211_lock);
+
static struct dongle_reg dongle = {
.type = IRDA_EP7211_IR,
.open = ep7211_ir_open,
@@ -36,7 +39,7 @@ static void ep7211_ir_open(dongle_t *sel
{
unsigned int syscon1, flags;
- save_flags(flags); cli();
+ spin_lock_irqsave(&ep7211_lock, flags);
/* Turn on the SIR encoder. */
syscon1 = clps_readl(SYSCON1);
@@ -46,14 +49,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(&ep7211_lock, flags);
}
static void ep7211_ir_close(dongle_t *self)
{
unsigned int syscon1, flags;
- save_flags(flags); cli();
+ spin_lock_irqsave(&ep7211_lock, flags);
/* Turn off the SIR encoder. */
syscon1 = clps_readl(SYSCON1);
@@ -63,7 +66,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(&ep7211_lock, flags);
}
/*
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH 4/5] IrDA: sti/cli removal from EP7211 IrDA driver
2006-02-13 22:15 [PATCH 4/5] IrDA: sti/cli removal from EP7211 IrDA driver Samuel Ortiz
@ 2006-02-19 8:36 ` David S. Miller
0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2006-02-19 8:36 UTC (permalink / raw)
To: samuel.ortiz-xNZwKgViW5gAvxtiuMwx3w
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, jt-sDzT885Ts8HQT0dZR+AlfA,
irda-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
From: Samuel Ortiz <samuel.ortiz-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
Date: Tue, 14 Feb 2006 00:15:38 +0200
> This patch replaces the deprecated sti/cli routines with the corresponding
> spin_lock ones.
>
> Signed-off-by: David chosrova <david.chosrova-TDf4sKD1mxeHlu7OokbhRg@public.gmane.org>
> Signed-off-by: Samuel Ortiz <samuel.ortiz-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
Applied.
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-02-19 8:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-13 22:15 [PATCH 4/5] IrDA: sti/cli removal from EP7211 IrDA driver Samuel Ortiz
2006-02-19 8:36 ` David S. Miller
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).