aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/syscall.c
diff options
context:
space:
mode:
authorDiego Woitasen <diego@woitasen.com.ar>2007-11-21 18:07:08 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-02-01 18:04:21 -0500
commit0741a951e8489ef2889d9e3eecf33bb29b779dd0 (patch)
tree687ff8648146dcd4e1ea0da71b46eceb3cd19a22 /drivers/pci/syscall.c
parent10d7425d201e866ee0c57424860e06118dae2500 (diff)
PCI: remove unneeded lock_kernel() in drivers/pci/syscall.c.
sys_pciconfig_{read,write}() are protected against PCI removal with the reference count in struct pci_dev. The concurrency of pci_user_{read,write}_config_* functions are already protected by pci_lock in drivers/pci/access.c. Signed-off-by: Diego Woitasen <diego@woitasen.com.ar> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/syscall.c')
-rw-r--r--drivers/pci/syscall.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/pci/syscall.c b/drivers/pci/syscall.c
index 2ac050d7f8c..645d7a60e41 100644
--- a/drivers/pci/syscall.c
+++ b/drivers/pci/syscall.c
@@ -34,7 +34,6 @@ sys_pciconfig_read(unsigned long bus, unsigned long dfn,
34 if (!dev) 34 if (!dev)
35 goto error; 35 goto error;
36 36
37 lock_kernel();
38 switch (len) { 37 switch (len) {
39 case 1: 38 case 1:
40 cfg_ret = pci_user_read_config_byte(dev, off, &byte); 39 cfg_ret = pci_user_read_config_byte(dev, off, &byte);
@@ -47,10 +46,8 @@ sys_pciconfig_read(unsigned long bus, unsigned long dfn,
47 break; 46 break;
48 default: 47 default:
49 err = -EINVAL; 48 err = -EINVAL;
50 unlock_kernel();
51 goto error; 49 goto error;
52 }; 50 };
53 unlock_kernel();
54 51
55 err = -EIO; 52 err = -EIO;
56 if (cfg_ret != PCIBIOS_SUCCESSFUL) 53 if (cfg_ret != PCIBIOS_SUCCESSFUL)
@@ -107,7 +104,6 @@ sys_pciconfig_write(unsigned long bus, unsigned long dfn,
107 if (!dev) 104 if (!dev)
108 return -ENODEV; 105 return -ENODEV;
109 106
110 lock_kernel();
111 switch(len) { 107 switch(len) {
112 case 1: 108 case 1:
113 err = get_user(byte, (u8 __user *)buf); 109 err = get_user(byte, (u8 __user *)buf);
@@ -140,7 +136,6 @@ sys_pciconfig_write(unsigned long bus, unsigned long dfn,
140 err = -EINVAL; 136 err = -EINVAL;
141 break; 137 break;
142 } 138 }
143 unlock_kernel();
144 pci_dev_put(dev); 139 pci_dev_put(dev);
145 return err; 140 return err;
146} 141}