patch-2.4.6 linux/drivers/video/matrox/matroxfb_g450.c

Next file: linux/drivers/video/mdacon.c
Previous file: linux/drivers/video/matrox/matroxfb_base.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.5/linux/drivers/video/matrox/matroxfb_g450.c linux/drivers/video/matrox/matroxfb_g450.c
@@ -6,17 +6,20 @@
 
 static int matroxfb_g450_get_reg(WPMINFO int reg) {
 	int val;
+	unsigned long flags;
 
-	matroxfb_DAC_lock();
+	matroxfb_DAC_lock_irqsave(flags);
 	val = matroxfb_DAC_in(PMINFO reg);
-	matroxfb_DAC_unlock();
+	matroxfb_DAC_unlock_irqrestore(flags);
 	return val;
 }
 
 static int matroxfb_g450_set_reg(WPMINFO int reg, int val) {
-	matroxfb_DAC_lock();
+	unsigned long flags;
+
+	matroxfb_DAC_lock_irqsave(flags);
 	matroxfb_DAC_out(PMINFO reg, val);
-	matroxfb_DAC_unlock();
+	matroxfb_DAC_unlock_irqrestore(flags);
 	return 0;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)