diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-11-19 13:55:14 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-06 13:52:25 -0800 |
commit | d72187b7cd4bac8eb9f87cabbb8d537145dc4bad (patch) | |
tree | 8c77d537068840c7cbcdc8a2f3194dd2bca68133 /drivers/staging | |
parent | 6d62a12bb0fde6a70eb18e2ba25e48f6fd5eee07 (diff) | |
download | op-kernel-dev-d72187b7cd4bac8eb9f87cabbb8d537145dc4bad.zip op-kernel-dev-d72187b7cd4bac8eb9f87cabbb8d537145dc4bad.tar.gz |
Staging: comedi: fix comedi_pci.h checkpatch.pl issues.
This resolves all the resolvable checkpatch.pl issues in the
comedi_pci.h file.
Cc: David Schleef <ds@schleef.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/comedi/drivers/comedi_pci.h | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/staging/comedi/drivers/comedi_pci.h b/drivers/staging/comedi/drivers/comedi_pci.h index 1407878..0f32be8 100644 --- a/drivers/staging/comedi/drivers/comedi_pci.h +++ b/drivers/staging/comedi/drivers/comedi_pci.h @@ -26,13 +26,8 @@ #ifndef _COMEDI_PCI_H_ #define _COMEDI_PCI_H_ -#include <linux/version.h> #include <linux/pci.h> -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20) -#define PCI_ENABLE_IS_REFCOUNTED -#endif - /* * Enables PCI device without requesting regions. Just a simple wrapper * for pci_enable_device(). @@ -52,9 +47,7 @@ static inline int comedi_pci_enable_no_regions(struct pci_dev *pdev) */ static inline void comedi_pci_disable_no_regions(struct pci_dev *pdev) { -#ifdef PCI_ENABLE_IS_REFCOUNTED pci_disable_device(pdev); -#endif } /* @@ -65,13 +58,13 @@ static inline int comedi_pci_enable(struct pci_dev *pdev, const char *res_name) int rc; rc = pci_enable_device(pdev); - if (rc < 0) { + if (rc < 0) return rc; - } + rc = pci_request_regions(pdev, res_name); - if (rc < 0) { + if (rc < 0) comedi_pci_disable_no_regions(pdev); - } + return rc; } |