Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jens Taprogge and committed by
Greg Kroah-Hartman
c6e2dfaa ea991147

+10 -19
+2 -7
drivers/staging/ipack/bridges/tpci200.c
··· 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 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; ··· 714 715 tpci200->number = tpci200->info->ipack_bus->bus_nr; 715 716 dev_set_drvdata(&pdev->dev, tpci200); 716 717 717 - /* 718 - * Give the same IRQ number as the slot number. 719 - * The TPCI200 has assigned his own two IRQ by PCI bus driver 720 - */ 721 718 for (i = 0; i < TPCI200_NB_SLOT; i++) 722 - ipack_device_register(tpci200->info->ipack_bus, i, i); 719 + ipack_device_register(tpci200->info->ipack_bus, i); 723 720 return 0; 724 721 725 722 out_err_bus_register:
+5 -4
drivers/staging/ipack/devices/ipoctal.c
··· 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; ··· 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 ··· 723 722 return -ENOMEM; 724 723 725 724 ipoctal->dev = dev; 726 - res = ipoctal_inst_slot(ipoctal, dev->bus_nr, dev->slot, dev->irq); 725 + res = ipoctal_inst_slot(ipoctal, dev->bus_nr, dev->slot); 727 726 if (res) 728 727 goto out_uninst; 729 728
+1 -2
drivers/staging/ipack/ipack.c
··· 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 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);
+2 -6
drivers/staging/ipack/ipack.h
··· 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. ··· 67 68 struct ipack_device { 68 69 unsigned int bus_nr; 69 70 unsigned int slot; 70 - unsigned int irq; 71 71 struct ipack_bus_device *bus; 72 72 struct ipack_addr_space id_space; 73 73 struct ipack_addr_space io_space; ··· 127 129 struct ipack_bus_ops { 128 130 int (*map_space) (struct ipack_device *dev, unsigned int memory_size, int space); 129 131 int (*unmap_space) (struct ipack_device *dev, int space); 130 - int (*request_irq) (struct ipack_device *dev, int vector, 132 + int (*request_irq) (struct ipack_device *dev, 131 133 irqreturn_t (*handler)(void *), void *arg); 132 134 int (*free_irq) (struct ipack_device *dev); 133 135 int (*get_clockrate) (struct ipack_device *dev); ··· 185 187 * 186 188 * @bus: ipack bus device it is plugged to. 187 189 * @slot: slot position in the bus device. 188 - * @irqv: IRQ vector for the mezzanine. 189 190 * 190 191 * Register a new ipack device (mezzanine device). The call is done by 191 192 * the carrier device driver. 192 193 */ 193 - struct ipack_device *ipack_device_register(struct ipack_bus_device *bus, 194 - int slot, int irqv); 194 + struct ipack_device *ipack_device_register(struct ipack_bus_device *bus, int slot); 195 195 void ipack_device_unregister(struct ipack_device *dev); 196 196 197 197 /**