diff options
author | Helge Deller <deller@gmx.de> | 2013-05-30 17:06:39 -0400 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2013-06-01 08:46:42 -0400 |
commit | 4edb38695d9a3cd62739f8595e21f36f0aabf4c2 (patch) | |
tree | 2f5ef46b4f2aab3ab24e69c082828cb2b1f2e8df | |
parent | c218c713c56b01d4a1cd69390f675cc44857f5fd (diff) |
parisc: parport0: fix this legacy no-device port driver!
Fix the above kernel error from parport_announce_port() on 32bit GSC
machines (e.g. B160L). The parport driver requires now a pointer to the
device struct.
Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r-- | drivers/parport/parport_gsc.c | 6 | ||||
-rw-r--r-- | drivers/parport/parport_gsc.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/parport/parport_gsc.c b/drivers/parport/parport_gsc.c index a5251cb5fb0c..6e3a60c78873 100644 --- a/drivers/parport/parport_gsc.c +++ b/drivers/parport/parport_gsc.c | |||
@@ -234,7 +234,7 @@ static int parport_PS2_supported(struct parport *pb) | |||
234 | 234 | ||
235 | struct parport *parport_gsc_probe_port(unsigned long base, | 235 | struct parport *parport_gsc_probe_port(unsigned long base, |
236 | unsigned long base_hi, int irq, | 236 | unsigned long base_hi, int irq, |
237 | int dma, struct pci_dev *dev) | 237 | int dma, struct parisc_device *padev) |
238 | { | 238 | { |
239 | struct parport_gsc_private *priv; | 239 | struct parport_gsc_private *priv; |
240 | struct parport_operations *ops; | 240 | struct parport_operations *ops; |
@@ -258,7 +258,6 @@ struct parport *parport_gsc_probe_port(unsigned long base, | |||
258 | priv->ctr_writable = 0xff; | 258 | priv->ctr_writable = 0xff; |
259 | priv->dma_buf = 0; | 259 | priv->dma_buf = 0; |
260 | priv->dma_handle = 0; | 260 | priv->dma_handle = 0; |
261 | priv->dev = dev; | ||
262 | p->base = base; | 261 | p->base = base; |
263 | p->base_hi = base_hi; | 262 | p->base_hi = base_hi; |
264 | p->irq = irq; | 263 | p->irq = irq; |
@@ -282,6 +281,7 @@ struct parport *parport_gsc_probe_port(unsigned long base, | |||
282 | return NULL; | 281 | return NULL; |
283 | } | 282 | } |
284 | 283 | ||
284 | p->dev = &padev->dev; | ||
285 | p->base_hi = base_hi; | 285 | p->base_hi = base_hi; |
286 | p->modes = tmp.modes; | 286 | p->modes = tmp.modes; |
287 | p->size = (p->modes & PARPORT_MODE_EPP)?8:3; | 287 | p->size = (p->modes & PARPORT_MODE_EPP)?8:3; |
@@ -373,7 +373,7 @@ static int parport_init_chip(struct parisc_device *dev) | |||
373 | } | 373 | } |
374 | 374 | ||
375 | p = parport_gsc_probe_port(port, 0, dev->irq, | 375 | p = parport_gsc_probe_port(port, 0, dev->irq, |
376 | /* PARPORT_IRQ_NONE */ PARPORT_DMA_NONE, NULL); | 376 | /* PARPORT_IRQ_NONE */ PARPORT_DMA_NONE, dev); |
377 | if (p) | 377 | if (p) |
378 | parport_count++; | 378 | parport_count++; |
379 | dev_set_drvdata(&dev->dev, p); | 379 | dev_set_drvdata(&dev->dev, p); |
diff --git a/drivers/parport/parport_gsc.h b/drivers/parport/parport_gsc.h index fc9c37c54022..812214768d27 100644 --- a/drivers/parport/parport_gsc.h +++ b/drivers/parport/parport_gsc.h | |||
@@ -217,6 +217,6 @@ extern void parport_gsc_dec_use_count(void); | |||
217 | extern struct parport *parport_gsc_probe_port(unsigned long base, | 217 | extern struct parport *parport_gsc_probe_port(unsigned long base, |
218 | unsigned long base_hi, | 218 | unsigned long base_hi, |
219 | int irq, int dma, | 219 | int irq, int dma, |
220 | struct pci_dev *dev); | 220 | struct parisc_device *padev); |
221 | 221 | ||
222 | #endif /* __DRIVERS_PARPORT_PARPORT_GSC_H */ | 222 | #endif /* __DRIVERS_PARPORT_PARPORT_GSC_H */ |