linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Linux Kernel Development <linux-kernel@vger.kernel.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH] M68k parport local_irq*() updates
Date: Fri, 27 Dec 2002 17:11:12 +0100	[thread overview]
Message-ID: <200212271611.gBRGBCV8008047@callisto.of.borg> (raw)

Convert m68k parport drivers to new local_irq*() framework:
  - Atari parport

--- linux-2.5.53/drivers/parport/parport_atari.c	Tue Oct  9 10:54:48 2001
+++ linux-m68k-2.5.53/drivers/parport/parport_atari.c	Thu Nov  7 23:09:56 2002
@@ -25,11 +25,10 @@
 	unsigned long flags;
 	unsigned char data;
 
-	save_flags(flags);
-	cli();
+	local_irq_save(flags);
 	sound_ym.rd_data_reg_sel = 15;
 	data = sound_ym.rd_data_reg_sel;
-	restore_flags(flags);
+	local_irq_restore(flags);
 	return data;
 }
 
@@ -38,11 +37,10 @@
 {
 	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	local_irq_save(flags);
 	sound_ym.rd_data_reg_sel = 15;
 	sound_ym.wd_data = data;
-	restore_flags(flags);
+	local_irq_restore(flags);
 }
 
 static unsigned char
@@ -51,12 +49,11 @@
 	unsigned long flags;
 	unsigned char control = 0;
 
-	save_flags(flags);
-	cli();
+	local_irq_save(flags);
 	sound_ym.rd_data_reg_sel = 14;
 	if (!(sound_ym.rd_data_reg_sel & (1 << 5)))
 		control = PARPORT_CONTROL_STROBE;
-	restore_flags(flags);
+	local_irq_restore(flags);
 	return control;
 }
 
@@ -65,14 +62,13 @@
 {
 	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	local_irq_save(flags);
 	sound_ym.rd_data_reg_sel = 14;
 	if (control & PARPORT_CONTROL_STROBE)
 		sound_ym.wd_data = sound_ym.rd_data_reg_sel & ~(1 << 5);
 	else
 		sound_ym.wd_data = sound_ym.rd_data_reg_sel | (1 << 5);
-	restore_flags(flags);
+	local_irq_restore(flags);
 }
 
 static unsigned char
@@ -129,12 +125,11 @@
 {
 	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	local_irq_save(flags);
 	/* Soundchip port B as output. */
 	sound_ym.rd_data_reg_sel = 7;
 	sound_ym.wd_data = sound_ym.rd_data_reg_sel | 0x40;
-	restore_flags(flags);
+	local_irq_restore(flags);
 }
 
 static void
@@ -143,12 +138,11 @@
 #if 0 /* too dangerous, can kill sound chip */
 	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	local_irq_save(flags);
 	/* Soundchip port B as input. */
 	sound_ym.rd_data_reg_sel = 7;
 	sound_ym.wd_data = sound_ym.rd_data_reg_sel & ~0x40;
-	restore_flags(flags);
+	local_irq_restore(flags);
 #endif
 }
 
@@ -209,15 +203,14 @@
 	unsigned long flags;
 
 	if (MACH_IS_ATARI) {
-		save_flags(flags);
-		cli();
+		local_irq_save(flags);
 		/* Soundchip port A/B as output. */
 		sound_ym.rd_data_reg_sel = 7;
 		sound_ym.wd_data = (sound_ym.rd_data_reg_sel & 0x3f) | 0xc0;
 		/* STROBE high. */
 		sound_ym.rd_data_reg_sel = 14;
 		sound_ym.wd_data = sound_ym.rd_data_reg_sel | (1 << 5);
-		restore_flags(flags);
+		local_irq_restore(flags);
 		/* MFP port I0 as input. */
 		mfp.data_dir &= ~1;
 		/* MFP port I0 interrupt on high->low edge. */

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

                 reply	other threads:[~2002-12-27 16:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200212271611.gBRGBCV8008047@callisto.of.borg \
    --to=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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;
as well as URLs for NNTP newsgroup(s).