summaryrefslogtreecommitdiffstats
path: root/drivers/staging/zcache
diff options
context:
space:
mode:
authorIan Abbott2013-03-15 14:39:52 +0100
committerGreg Kroah-Hartman2013-03-15 17:17:21 +0100
commita14592896023adcab12307774c89284ce0744ce2 (patch)
tree3892b0b3a842bb9562516886ae4bcce39e73dce8 /drivers/staging/zcache
parentstaging: comedi: remove unneeded settings of `dev->iobase` (diff)
downloadkernel-qcow2-linux-a14592896023adcab12307774c89284ce0744ce2.tar.gz
kernel-qcow2-linux-a14592896023adcab12307774c89284ce0744ce2.tar.xz
kernel-qcow2-linux-a14592896023adcab12307774c89284ce0744ce2.zip
staging: comedi: ni_labpc: fix common detach
`labpc_common_detach()` calls `comedi_pci_disable()` unconditionally. That's okay for PCI devices and harmless for ISA devices (as the `hw_dev` member will be NULL so `comedi_to_pci_dev()` will return NULL and `comedi_pci_disable()` checks for that), but it is disastrous for PCMCIA devices. Those are managed by the "ni_labpc_cs" module but it calls this `labpc_common_detach()` and the `hw_dev` member will be pointing to the `struct device` embedded in a `struct pcmcia_device` in that case. That's enough to confuse `comedi_pci_disable()` into thinking it's a valid PCI device to be disabled. Use the private board information (`thisboard`) to make sure it is a PCI device before calling `comedi_pci_disable()`. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/zcache')
0 files changed, 0 insertions, 0 deletions