aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-12-06 23:40:29 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 11:39:45 -0500
commit9828673d7d24a09fcc3931b3b84c539146979224 (patch)
tree85a4d1b5ceda160415384bb45b640d5c8a4edd5a
parent4b358e22064b4551aa8b4dcfe3efe70a13548676 (diff)
[PATCH] paride: remove parport #ifdef's
CONFIG_PARIDE depends on CONFIG_PARPORT_PC, so there's no reason for these #ifdef's. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/block/paride/bpck6.c13
-rw-r--r--drivers/block/paride/paride.c33
2 files changed, 0 insertions, 46 deletions
diff --git a/drivers/block/paride/bpck6.c b/drivers/block/paride/bpck6.c
index da6b5d27badb..ad124525ac23 100644
--- a/drivers/block/paride/bpck6.c
+++ b/drivers/block/paride/bpck6.c
@@ -31,10 +31,7 @@ static int verbose; /* set this to 1 to see debugging messages and whatnot */
31#include <linux/slab.h> 31#include <linux/slab.h>
32#include <linux/types.h> 32#include <linux/types.h>
33#include <asm/io.h> 33#include <asm/io.h>
34
35#if defined(CONFIG_PARPORT_MODULE)||defined(CONFIG_PARPORT)
36#include <linux/parport.h> 34#include <linux/parport.h>
37#endif
38 35
39#include "ppc6lnx.c" 36#include "ppc6lnx.c"
40#include "paride.h" 37#include "paride.h"
@@ -139,11 +136,6 @@ static int bpck6_test_port ( PIA *pi ) /* check for 8-bit port */
139 PPCSTRUCT(pi)->ppc_id=pi->unit; 136 PPCSTRUCT(pi)->ppc_id=pi->unit;
140 PPCSTRUCT(pi)->lpt_addr=pi->port; 137 PPCSTRUCT(pi)->lpt_addr=pi->port;
141 138
142#ifdef CONFIG_PARPORT_PC_MODULE
143#define CONFIG_PARPORT_PC
144#endif
145
146#ifdef CONFIG_PARPORT_PC
147 /* look at the parport device to see if what modes we can use */ 139 /* look at the parport device to see if what modes we can use */
148 if(((struct pardevice *)(pi->pardev))->port->modes & 140 if(((struct pardevice *)(pi->pardev))->port->modes &
149 (PARPORT_MODE_EPP) 141 (PARPORT_MODE_EPP)
@@ -161,11 +153,6 @@ static int bpck6_test_port ( PIA *pi ) /* check for 8-bit port */
161 { 153 {
162 return 1; 154 return 1;
163 } 155 }
164#else
165 /* there is no way of knowing what kind of port we have
166 default to the highest mode possible */
167 return 5;
168#endif
169} 156}
170 157
171static int bpck6_probe_unit ( PIA *pi ) 158static int bpck6_probe_unit ( PIA *pi )
diff --git a/drivers/block/paride/paride.c b/drivers/block/paride/paride.c
index e4c55e050126..48c50f11f63b 100644
--- a/drivers/block/paride/paride.c
+++ b/drivers/block/paride/paride.c
@@ -29,14 +29,7 @@
29#include <linux/spinlock.h> 29#include <linux/spinlock.h>
30#include <linux/wait.h> 30#include <linux/wait.h>
31#include <linux/sched.h> /* TASK_* */ 31#include <linux/sched.h> /* TASK_* */
32
33#ifdef CONFIG_PARPORT_MODULE
34#define CONFIG_PARPORT
35#endif
36
37#ifdef CONFIG_PARPORT
38#include <linux/parport.h> 32#include <linux/parport.h>
39#endif
40 33
41#include "paride.h" 34#include "paride.h"
42 35
@@ -76,8 +69,6 @@ void pi_read_block(PIA * pi, char *buf, int count)
76 69
77EXPORT_SYMBOL(pi_read_block); 70EXPORT_SYMBOL(pi_read_block);
78 71
79#ifdef CONFIG_PARPORT
80
81static void pi_wake_up(void *p) 72static void pi_wake_up(void *p)
82{ 73{
83 PIA *pi = (PIA *) p; 74 PIA *pi = (PIA *) p;
@@ -100,11 +91,8 @@ static void pi_wake_up(void *p)
100 cont(); 91 cont();
101} 92}
102 93
103#endif
104
105int pi_schedule_claimed(PIA * pi, void (*cont) (void)) 94int pi_schedule_claimed(PIA * pi, void (*cont) (void))
106{ 95{
107#ifdef CONFIG_PARPORT
108 unsigned long flags; 96 unsigned long flags;
109 97
110 spin_lock_irqsave(&pi_spinlock, flags); 98 spin_lock_irqsave(&pi_spinlock, flags);
@@ -115,7 +103,6 @@ int pi_schedule_claimed(PIA * pi, void (*cont) (void))
115 } 103 }
116 pi->claimed = 1; 104 pi->claimed = 1;
117 spin_unlock_irqrestore(&pi_spinlock, flags); 105 spin_unlock_irqrestore(&pi_spinlock, flags);
118#endif
119 return 1; 106 return 1;
120} 107}
121EXPORT_SYMBOL(pi_schedule_claimed); 108EXPORT_SYMBOL(pi_schedule_claimed);
@@ -133,20 +120,16 @@ static void pi_claim(PIA * pi)
133 if (pi->claimed) 120 if (pi->claimed)
134 return; 121 return;
135 pi->claimed = 1; 122 pi->claimed = 1;
136#ifdef CONFIG_PARPORT
137 if (pi->pardev) 123 if (pi->pardev)
138 wait_event(pi->parq, 124 wait_event(pi->parq,
139 !parport_claim((struct pardevice *) pi->pardev)); 125 !parport_claim((struct pardevice *) pi->pardev));
140#endif
141} 126}
142 127
143static void pi_unclaim(PIA * pi) 128static void pi_unclaim(PIA * pi)
144{ 129{
145 pi->claimed = 0; 130 pi->claimed = 0;
146#ifdef CONFIG_PARPORT
147 if (pi->pardev) 131 if (pi->pardev)
148 parport_release((struct pardevice *) (pi->pardev)); 132 parport_release((struct pardevice *) (pi->pardev));
149#endif
150} 133}
151 134
152void pi_connect(PIA * pi) 135void pi_connect(PIA * pi)
@@ -167,21 +150,15 @@ EXPORT_SYMBOL(pi_disconnect);
167 150
168static void pi_unregister_parport(PIA * pi) 151static void pi_unregister_parport(PIA * pi)
169{ 152{
170#ifdef CONFIG_PARPORT
171 if (pi->pardev) { 153 if (pi->pardev) {
172 parport_unregister_device((struct pardevice *) (pi->pardev)); 154 parport_unregister_device((struct pardevice *) (pi->pardev));
173 pi->pardev = NULL; 155 pi->pardev = NULL;
174 } 156 }
175#endif
176} 157}
177 158
178void pi_release(PIA * pi) 159void pi_release(PIA * pi)
179{ 160{
180 pi_unregister_parport(pi); 161 pi_unregister_parport(pi);
181#ifndef CONFIG_PARPORT
182 if (pi->reserved)
183 release_region(pi->port, pi->reserved);
184#endif /* !CONFIG_PARPORT */
185 if (pi->proto->release_proto) 162 if (pi->proto->release_proto)
186 pi->proto->release_proto(pi); 163 pi->proto->release_proto(pi);
187 module_put(pi->proto->owner); 164 module_put(pi->proto->owner);
@@ -269,8 +246,6 @@ EXPORT_SYMBOL(paride_unregister);
269 246
270static int pi_register_parport(PIA * pi, int verbose) 247static int pi_register_parport(PIA * pi, int verbose)
271{ 248{
272#ifdef CONFIG_PARPORT
273
274 struct parport *port; 249 struct parport *port;
275 250
276 port = parport_find_base(pi->port); 251 port = parport_find_base(pi->port);
@@ -290,7 +265,6 @@ static int pi_register_parport(PIA * pi, int verbose)
290 printk("%s: 0x%x is %s\n", pi->device, pi->port, port->name); 265 printk("%s: 0x%x is %s\n", pi->device, pi->port, port->name);
291 266
292 pi->parname = (char *) port->name; 267 pi->parname = (char *) port->name;
293#endif
294 268
295 return 1; 269 return 1;
296} 270}
@@ -447,13 +421,6 @@ int pi_init(PIA * pi, int autoprobe, int port, int mode,
447 printk("%s: Adapter not found\n", device); 421 printk("%s: Adapter not found\n", device);
448 return 0; 422 return 0;
449 } 423 }
450#ifndef CONFIG_PARPORT
451 if (!request_region(pi->port, pi->reserved, pi->device)) {
452 printk(KERN_WARNING "paride: Unable to request region 0x%x\n",
453 pi->port);
454 return 0;
455 }
456#endif /* !CONFIG_PARPORT */
457 424
458 if (pi->parname) 425 if (pi->parname)
459 printk("%s: Sharing %s at 0x%x\n", pi->device, 426 printk("%s: Sharing %s at 0x%x\n", pi->device,