diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2010-07-03 18:02:28 -0400 |
|---|---|---|
| committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-10-15 16:09:47 -0400 |
| commit | 991f739544a0923b70fb69b115edb880ff9fcc4a (patch) | |
| tree | 74ebd40122d120e058d9f245ac5e3c989c40ef3a /drivers/pci/proc.c | |
| parent | 93e75faba3982767d425323aec5726282d3ad7a2 (diff) | |
PCI: kill BKL in /proc/pci
All operations in the pci procfs ioctl functions are
atomic, so no lock is needed here.
Also add a compat_ioctl method, since all the commands
are compatible in 32 bit mode.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: linux-pci@vger.kernel.org
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/proc.c')
| -rw-r--r-- | drivers/pci/proc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c index 01f0306525a5..297b72c880a1 100644 --- a/drivers/pci/proc.c +++ b/drivers/pci/proc.c | |||
| @@ -212,8 +212,6 @@ static long proc_bus_pci_ioctl(struct file *file, unsigned int cmd, | |||
| 212 | #endif /* HAVE_PCI_MMAP */ | 212 | #endif /* HAVE_PCI_MMAP */ |
| 213 | int ret = 0; | 213 | int ret = 0; |
| 214 | 214 | ||
| 215 | lock_kernel(); | ||
| 216 | |||
| 217 | switch (cmd) { | 215 | switch (cmd) { |
| 218 | case PCIIOC_CONTROLLER: | 216 | case PCIIOC_CONTROLLER: |
| 219 | ret = pci_domain_nr(dev->bus); | 217 | ret = pci_domain_nr(dev->bus); |
| @@ -242,7 +240,6 @@ static long proc_bus_pci_ioctl(struct file *file, unsigned int cmd, | |||
| 242 | break; | 240 | break; |
| 243 | }; | 241 | }; |
| 244 | 242 | ||
| 245 | unlock_kernel(); | ||
| 246 | return ret; | 243 | return ret; |
| 247 | } | 244 | } |
| 248 | 245 | ||
| @@ -306,6 +303,7 @@ static const struct file_operations proc_bus_pci_operations = { | |||
| 306 | .read = proc_bus_pci_read, | 303 | .read = proc_bus_pci_read, |
| 307 | .write = proc_bus_pci_write, | 304 | .write = proc_bus_pci_write, |
| 308 | .unlocked_ioctl = proc_bus_pci_ioctl, | 305 | .unlocked_ioctl = proc_bus_pci_ioctl, |
| 306 | .compat_ioctl = proc_bus_pci_ioctl, | ||
| 309 | #ifdef HAVE_PCI_MMAP | 307 | #ifdef HAVE_PCI_MMAP |
| 310 | .open = proc_bus_pci_open, | 308 | .open = proc_bus_pci_open, |
| 311 | .release = proc_bus_pci_release, | 309 | .release = proc_bus_pci_release, |
