aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan/dscc4.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wan/dscc4.c')
-rw-r--r--drivers/net/wan/dscc4.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c
index 1ff5de076d21..4505540e3c59 100644
--- a/drivers/net/wan/dscc4.c
+++ b/drivers/net/wan/dscc4.c
@@ -105,6 +105,7 @@
105#include <linux/delay.h> 105#include <linux/delay.h>
106#include <net/syncppp.h> 106#include <net/syncppp.h>
107#include <linux/hdlc.h> 107#include <linux/hdlc.h>
108#include <linux/mutex.h>
108 109
109/* Version */ 110/* Version */
110static const char version[] = "$Id: dscc4.c,v 1.173 2003/09/20 23:55:34 romieu Exp $ for Linux\n"; 111static const char version[] = "$Id: dscc4.c,v 1.173 2003/09/20 23:55:34 romieu Exp $ for Linux\n";
@@ -112,7 +113,7 @@ static int debug;
112static int quartz; 113static int quartz;
113 114
114#ifdef CONFIG_DSCC4_PCI_RST 115#ifdef CONFIG_DSCC4_PCI_RST
115static DECLARE_MUTEX(dscc4_sem); 116static DEFINE_MUTEX(dscc4_mutex);
116static u32 dscc4_pci_config_store[16]; 117static u32 dscc4_pci_config_store[16];
117#endif 118#endif
118 119
@@ -1018,7 +1019,7 @@ static void dscc4_pci_reset(struct pci_dev *pdev, void __iomem *ioaddr)
1018{ 1019{
1019 int i; 1020 int i;
1020 1021
1021 down(&dscc4_sem); 1022 mutex_lock(&dscc4_mutex);
1022 for (i = 0; i < 16; i++) 1023 for (i = 0; i < 16; i++)
1023 pci_read_config_dword(pdev, i << 2, dscc4_pci_config_store + i); 1024 pci_read_config_dword(pdev, i << 2, dscc4_pci_config_store + i);
1024 1025
@@ -1039,7 +1040,7 @@ static void dscc4_pci_reset(struct pci_dev *pdev, void __iomem *ioaddr)
1039 1040
1040 for (i = 0; i < 16; i++) 1041 for (i = 0; i < 16; i++)
1041 pci_write_config_dword(pdev, i << 2, dscc4_pci_config_store[i]); 1042 pci_write_config_dword(pdev, i << 2, dscc4_pci_config_store[i]);
1042 up(&dscc4_sem); 1043 mutex_unlock(&dscc4_mutex);
1043} 1044}
1044#else 1045#else
1045#define dscc4_pci_reset(pdev,ioaddr) do {} while (0) 1046#define dscc4_pci_reset(pdev,ioaddr) do {} while (0)