From ef07f479550aecfa06a5e400b5a56593ca73b8b6 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 19 Nov 2008 13:55:14 -0800 Subject: [PATCH 12/21] 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 Cc: Frank Mori Hess Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/comedi_pci.h | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) --- 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 #include -#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_r */ 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(stru 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; }