Commit c6e2dfaa5251f584a05df74911685775dd750e2d
Committed by
Greg Kroah-Hartman
1 parent
ea991147ec
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
staging: ipack: remove irq field in struct ipack_device.
The field irq currently is identical to the slot number. It does not seem to have any real use. The number is written to hardware in ipoctal but it seems the value that is written does not matter. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing 4 changed files with 10 additions and 19 deletions Side-by-side Diff
drivers/staging/ipack/bridges/tpci200.c
... | ... | @@ -190,7 +190,7 @@ |
190 | 190 | return 0; |
191 | 191 | } |
192 | 192 | |
193 | -static int tpci200_request_irq(struct ipack_device *dev, int vector, | |
193 | +static int tpci200_request_irq(struct ipack_device *dev, | |
194 | 194 | irqreturn_t (*handler)(void *), void *arg) |
195 | 195 | { |
196 | 196 | int res = 0; |
... | ... | @@ -227,7 +227,6 @@ |
227 | 227 | * Read the User Manual of your IndustryPack device to know |
228 | 228 | * where to write the vector in memory. |
229 | 229 | */ |
230 | - slot_irq->vector = vector; | |
231 | 230 | slot_irq->handler = handler; |
232 | 231 | slot_irq->arg = arg; |
233 | 232 | slot_irq->holder = dev; |
234 | 233 | |
... | ... | @@ -715,12 +714,8 @@ |
715 | 714 | tpci200->number = tpci200->info->ipack_bus->bus_nr; |
716 | 715 | dev_set_drvdata(&pdev->dev, tpci200); |
717 | 716 | |
718 | - /* | |
719 | - * Give the same IRQ number as the slot number. | |
720 | - * The TPCI200 has assigned his own two IRQ by PCI bus driver | |
721 | - */ | |
722 | 717 | for (i = 0; i < TPCI200_NB_SLOT; i++) |
723 | - ipack_device_register(tpci200->info->ipack_bus, i, i); | |
718 | + ipack_device_register(tpci200->info->ipack_bus, i); | |
724 | 719 | return 0; |
725 | 720 | |
726 | 721 | out_err_bus_register: |
drivers/staging/ipack/devices/ipoctal.c
... | ... | @@ -288,7 +288,7 @@ |
288 | 288 | }; |
289 | 289 | |
290 | 290 | static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr, |
291 | - unsigned int slot, unsigned int vector) | |
291 | + unsigned int slot) | |
292 | 292 | { |
293 | 293 | int res = 0; |
294 | 294 | int i; |
295 | 295 | |
... | ... | @@ -387,9 +387,10 @@ |
387 | 387 | * Depending of the carrier these addresses are accesible or not. |
388 | 388 | * More info in the datasheet. |
389 | 389 | */ |
390 | - ipoctal->dev->bus->ops->request_irq(ipoctal->dev, vector, | |
390 | + ipoctal->dev->bus->ops->request_irq(ipoctal->dev, | |
391 | 391 | ipoctal_irq_handler, ipoctal); |
392 | - iowrite8(vector, ipoctal->dev->mem_space.address + 1); | |
392 | + /* Dummy write */ | |
393 | + iowrite8(1, ipoctal->dev->mem_space.address + 1); | |
393 | 394 | |
394 | 395 | /* Register the TTY device */ |
395 | 396 | |
... | ... | @@ -722,7 +723,7 @@ |
722 | 723 | return -ENOMEM; |
723 | 724 | |
724 | 725 | ipoctal->dev = dev; |
725 | - res = ipoctal_inst_slot(ipoctal, dev->bus_nr, dev->slot, dev->irq); | |
726 | + res = ipoctal_inst_slot(ipoctal, dev->bus_nr, dev->slot); | |
726 | 727 | if (res) |
727 | 728 | goto out_uninst; |
728 | 729 |
drivers/staging/ipack/ipack.c
... | ... | @@ -427,7 +427,7 @@ |
427 | 427 | } |
428 | 428 | |
429 | 429 | struct ipack_device *ipack_device_register(struct ipack_bus_device *bus, |
430 | - int slot, int irqv) | |
430 | + int slot) | |
431 | 431 | { |
432 | 432 | int ret; |
433 | 433 | struct ipack_device *dev; |
... | ... | @@ -441,7 +441,6 @@ |
441 | 441 | dev->dev.parent = bus->parent; |
442 | 442 | dev->slot = slot; |
443 | 443 | dev->bus_nr = bus->bus_nr; |
444 | - dev->irq = irqv; | |
445 | 444 | dev->bus = bus; |
446 | 445 | dev_set_name(&dev->dev, |
447 | 446 | "ipack-dev.%u.%u", dev->bus_nr, dev->slot); |
drivers/staging/ipack/ipack.h
... | ... | @@ -54,7 +54,6 @@ |
54 | 54 | * |
55 | 55 | * @bus_nr: IP bus number where the device is plugged |
56 | 56 | * @slot: Slot where the device is plugged in the carrier board |
57 | - * @irq: IRQ vector | |
58 | 57 | * @bus: ipack_bus_device where the device is plugged to. |
59 | 58 | * @id_space: Virtual address to ID space. |
60 | 59 | * @io_space: Virtual address to IO space. |
... | ... | @@ -68,7 +67,6 @@ |
68 | 67 | struct ipack_device { |
69 | 68 | unsigned int bus_nr; |
70 | 69 | unsigned int slot; |
71 | - unsigned int irq; | |
72 | 70 | struct ipack_bus_device *bus; |
73 | 71 | struct ipack_addr_space id_space; |
74 | 72 | struct ipack_addr_space io_space; |
... | ... | @@ -129,7 +127,7 @@ |
129 | 127 | struct ipack_bus_ops { |
130 | 128 | int (*map_space) (struct ipack_device *dev, unsigned int memory_size, int space); |
131 | 129 | int (*unmap_space) (struct ipack_device *dev, int space); |
132 | - int (*request_irq) (struct ipack_device *dev, int vector, | |
130 | + int (*request_irq) (struct ipack_device *dev, | |
133 | 131 | irqreturn_t (*handler)(void *), void *arg); |
134 | 132 | int (*free_irq) (struct ipack_device *dev); |
135 | 133 | int (*get_clockrate) (struct ipack_device *dev); |
136 | 134 | |
... | ... | @@ -187,13 +185,11 @@ |
187 | 185 | * |
188 | 186 | * @bus: ipack bus device it is plugged to. |
189 | 187 | * @slot: slot position in the bus device. |
190 | - * @irqv: IRQ vector for the mezzanine. | |
191 | 188 | * |
192 | 189 | * Register a new ipack device (mezzanine device). The call is done by |
193 | 190 | * the carrier device driver. |
194 | 191 | */ |
195 | -struct ipack_device *ipack_device_register(struct ipack_bus_device *bus, | |
196 | - int slot, int irqv); | |
192 | +struct ipack_device *ipack_device_register(struct ipack_bus_device *bus, int slot); | |
197 | 193 | void ipack_device_unregister(struct ipack_device *dev); |
198 | 194 | |
199 | 195 | /** |