aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/kernel/scx200.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/i386/kernel/scx200.c b/arch/i386/kernel/scx200.c
index edead73ebef2..9bf590cefc7d 100644
--- a/arch/i386/kernel/scx200.c
+++ b/arch/i386/kernel/scx200.c
@@ -9,6 +9,7 @@
9#include <linux/errno.h> 9#include <linux/errno.h>
10#include <linux/kernel.h> 10#include <linux/kernel.h>
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/mutex.h>
12#include <linux/pci.h> 13#include <linux/pci.h>
13 14
14#include <linux/scx200.h> 15#include <linux/scx200.h>
@@ -45,7 +46,7 @@ static struct pci_driver scx200_pci_driver = {
45 .probe = scx200_probe, 46 .probe = scx200_probe,
46}; 47};
47 48
48static DEFINE_SPINLOCK(scx200_gpio_config_lock); 49static DEFINE_MUTEX(scx200_gpio_config_lock);
49 50
50static void __devinit scx200_init_shadow(void) 51static void __devinit scx200_init_shadow(void)
51{ 52{
@@ -95,9 +96,8 @@ static int __devinit scx200_probe(struct pci_dev *pdev, const struct pci_device_
95u32 scx200_gpio_configure(unsigned index, u32 mask, u32 bits) 96u32 scx200_gpio_configure(unsigned index, u32 mask, u32 bits)
96{ 97{
97 u32 config, new_config; 98 u32 config, new_config;
98 unsigned long flags;
99 99
100 spin_lock_irqsave(&scx200_gpio_config_lock, flags); 100 mutex_lock(&scx200_gpio_config_lock);
101 101
102 outl(index, scx200_gpio_base + 0x20); 102 outl(index, scx200_gpio_base + 0x20);
103 config = inl(scx200_gpio_base + 0x24); 103 config = inl(scx200_gpio_base + 0x24);
@@ -105,7 +105,7 @@ u32 scx200_gpio_configure(unsigned index, u32 mask, u32 bits)
105 new_config = (config & mask) | bits; 105 new_config = (config & mask) | bits;
106 outl(new_config, scx200_gpio_base + 0x24); 106 outl(new_config, scx200_gpio_base + 0x24);
107 107
108 spin_unlock_irqrestore(&scx200_gpio_config_lock, flags); 108 mutex_unlock(&scx200_gpio_config_lock);
109 109
110 return config; 110 return config;
111} 111}