aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-11-19 16:55:14 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-06 16:52:25 -0500
commitd72187b7cd4bac8eb9f87cabbb8d537145dc4bad (patch)
tree8c77d537068840c7cbcdc8a2f3194dd2bca68133 /drivers
parent6d62a12bb0fde6a70eb18e2ba25e48f6fd5eee07 (diff)
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')
-rw-r--r--drivers/staging/comedi/drivers/comedi_pci.h15
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 14078783915..0f32be8ff96 100644
--- a/drivers/staging/comedi/drivers/comedi_pci.h
+++ b/drivers/staging/comedi/drivers/comedi_pci.h
@@ -26,13 +26,8 @@
26#ifndef _COMEDI_PCI_H_ 26#ifndef _COMEDI_PCI_H_
27#define _COMEDI_PCI_H_ 27#define _COMEDI_PCI_H_
28 28
29#include <linux/version.h>
30#include <linux/pci.h> 29#include <linux/pci.h>
31 30
32#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
33#define PCI_ENABLE_IS_REFCOUNTED
34#endif
35
36/* 31/*
37 * Enables PCI device without requesting regions. Just a simple wrapper 32 * Enables PCI device without requesting regions. Just a simple wrapper
38 * for pci_enable_device(). 33 * for pci_enable_device().
@@ -52,9 +47,7 @@ static inline int comedi_pci_enable_no_regions(struct pci_dev *pdev)
52 */ 47 */
53static inline void comedi_pci_disable_no_regions(struct pci_dev *pdev) 48static inline void comedi_pci_disable_no_regions(struct pci_dev *pdev)
54{ 49{
55#ifdef PCI_ENABLE_IS_REFCOUNTED
56 pci_disable_device(pdev); 50 pci_disable_device(pdev);
57#endif
58} 51}
59 52
60/* 53/*
@@ -65,13 +58,13 @@ static inline int comedi_pci_enable(struct pci_dev *pdev, const char *res_name)
65 int rc; 58 int rc;
66 59
67 rc = pci_enable_device(pdev); 60 rc = pci_enable_device(pdev);
68 if (rc < 0) { 61 if (rc < 0)
69 return rc; 62 return rc;
70 } 63
71 rc = pci_request_regions(pdev, res_name); 64 rc = pci_request_regions(pdev, res_name);
72 if (rc < 0) { 65 if (rc < 0)
73 comedi_pci_disable_no_regions(pdev); 66 comedi_pci_disable_no_regions(pdev);
74 } 67
75 return rc; 68 return rc;
76} 69}
77 70