Commit c6e2dfaa authored by Jens Taprogge's avatar Jens Taprogge Committed by Greg Kroah-Hartman

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: default avatarJens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: default avatarSamuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ea991147
...@@ -190,7 +190,7 @@ static int tpci200_free_irq(struct ipack_device *dev) ...@@ -190,7 +190,7 @@ static int tpci200_free_irq(struct ipack_device *dev)
return 0; return 0;
} }
static int tpci200_request_irq(struct ipack_device *dev, int vector, static int tpci200_request_irq(struct ipack_device *dev,
irqreturn_t (*handler)(void *), void *arg) irqreturn_t (*handler)(void *), void *arg)
{ {
int res = 0; int res = 0;
...@@ -227,7 +227,6 @@ static int tpci200_request_irq(struct ipack_device *dev, int vector, ...@@ -227,7 +227,6 @@ static int tpci200_request_irq(struct ipack_device *dev, int vector,
* Read the User Manual of your IndustryPack device to know * Read the User Manual of your IndustryPack device to know
* where to write the vector in memory. * where to write the vector in memory.
*/ */
slot_irq->vector = vector;
slot_irq->handler = handler; slot_irq->handler = handler;
slot_irq->arg = arg; slot_irq->arg = arg;
slot_irq->holder = dev; slot_irq->holder = dev;
...@@ -715,12 +714,8 @@ static int tpci200_pci_probe(struct pci_dev *pdev, ...@@ -715,12 +714,8 @@ static int tpci200_pci_probe(struct pci_dev *pdev,
tpci200->number = tpci200->info->ipack_bus->bus_nr; tpci200->number = tpci200->info->ipack_bus->bus_nr;
dev_set_drvdata(&pdev->dev, tpci200); dev_set_drvdata(&pdev->dev, tpci200);
/*
* Give the same IRQ number as the slot number.
* The TPCI200 has assigned his own two IRQ by PCI bus driver
*/
for (i = 0; i < TPCI200_NB_SLOT; i++) for (i = 0; i < TPCI200_NB_SLOT; i++)
ipack_device_register(tpci200->info->ipack_bus, i, i); ipack_device_register(tpci200->info->ipack_bus, i);
return 0; return 0;
out_err_bus_register: out_err_bus_register:
......
...@@ -288,7 +288,7 @@ static const struct tty_port_operations ipoctal_tty_port_ops = { ...@@ -288,7 +288,7 @@ static const struct tty_port_operations ipoctal_tty_port_ops = {
}; };
static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr, static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr,
unsigned int slot, unsigned int vector) unsigned int slot)
{ {
int res = 0; int res = 0;
int i; int i;
...@@ -387,9 +387,10 @@ static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr, ...@@ -387,9 +387,10 @@ static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr,
* Depending of the carrier these addresses are accesible or not. * Depending of the carrier these addresses are accesible or not.
* More info in the datasheet. * More info in the datasheet.
*/ */
ipoctal->dev->bus->ops->request_irq(ipoctal->dev, vector, ipoctal->dev->bus->ops->request_irq(ipoctal->dev,
ipoctal_irq_handler, ipoctal); ipoctal_irq_handler, ipoctal);
iowrite8(vector, ipoctal->dev->mem_space.address + 1); /* Dummy write */
iowrite8(1, ipoctal->dev->mem_space.address + 1);
/* Register the TTY device */ /* Register the TTY device */
...@@ -722,7 +723,7 @@ static int ipoctal_probe(struct ipack_device *dev) ...@@ -722,7 +723,7 @@ static int ipoctal_probe(struct ipack_device *dev)
return -ENOMEM; return -ENOMEM;
ipoctal->dev = dev; ipoctal->dev = dev;
res = ipoctal_inst_slot(ipoctal, dev->bus_nr, dev->slot, dev->irq); res = ipoctal_inst_slot(ipoctal, dev->bus_nr, dev->slot);
if (res) if (res)
goto out_uninst; goto out_uninst;
......
...@@ -427,7 +427,7 @@ static int ipack_device_read_id(struct ipack_device *dev) ...@@ -427,7 +427,7 @@ static int ipack_device_read_id(struct ipack_device *dev)
} }
struct ipack_device *ipack_device_register(struct ipack_bus_device *bus, struct ipack_device *ipack_device_register(struct ipack_bus_device *bus,
int slot, int irqv) int slot)
{ {
int ret; int ret;
struct ipack_device *dev; struct ipack_device *dev;
...@@ -441,7 +441,6 @@ struct ipack_device *ipack_device_register(struct ipack_bus_device *bus, ...@@ -441,7 +441,6 @@ struct ipack_device *ipack_device_register(struct ipack_bus_device *bus,
dev->dev.parent = bus->parent; dev->dev.parent = bus->parent;
dev->slot = slot; dev->slot = slot;
dev->bus_nr = bus->bus_nr; dev->bus_nr = bus->bus_nr;
dev->irq = irqv;
dev->bus = bus; dev->bus = bus;
dev_set_name(&dev->dev, dev_set_name(&dev->dev,
"ipack-dev.%u.%u", dev->bus_nr, dev->slot); "ipack-dev.%u.%u", dev->bus_nr, dev->slot);
......
...@@ -54,7 +54,6 @@ struct ipack_addr_space { ...@@ -54,7 +54,6 @@ struct ipack_addr_space {
* *
* @bus_nr: IP bus number where the device is plugged * @bus_nr: IP bus number where the device is plugged
* @slot: Slot where the device is plugged in the carrier board * @slot: Slot where the device is plugged in the carrier board
* @irq: IRQ vector
* @bus: ipack_bus_device where the device is plugged to. * @bus: ipack_bus_device where the device is plugged to.
* @id_space: Virtual address to ID space. * @id_space: Virtual address to ID space.
* @io_space: Virtual address to IO space. * @io_space: Virtual address to IO space.
...@@ -68,7 +67,6 @@ struct ipack_addr_space { ...@@ -68,7 +67,6 @@ struct ipack_addr_space {
struct ipack_device { struct ipack_device {
unsigned int bus_nr; unsigned int bus_nr;
unsigned int slot; unsigned int slot;
unsigned int irq;
struct ipack_bus_device *bus; struct ipack_bus_device *bus;
struct ipack_addr_space id_space; struct ipack_addr_space id_space;
struct ipack_addr_space io_space; struct ipack_addr_space io_space;
...@@ -129,7 +127,7 @@ struct ipack_driver { ...@@ -129,7 +127,7 @@ struct ipack_driver {
struct ipack_bus_ops { struct ipack_bus_ops {
int (*map_space) (struct ipack_device *dev, unsigned int memory_size, int space); int (*map_space) (struct ipack_device *dev, unsigned int memory_size, int space);
int (*unmap_space) (struct ipack_device *dev, int space); int (*unmap_space) (struct ipack_device *dev, int space);
int (*request_irq) (struct ipack_device *dev, int vector, int (*request_irq) (struct ipack_device *dev,
irqreturn_t (*handler)(void *), void *arg); irqreturn_t (*handler)(void *), void *arg);
int (*free_irq) (struct ipack_device *dev); int (*free_irq) (struct ipack_device *dev);
int (*get_clockrate) (struct ipack_device *dev); int (*get_clockrate) (struct ipack_device *dev);
...@@ -187,13 +185,11 @@ void ipack_driver_unregister(struct ipack_driver *edrv); ...@@ -187,13 +185,11 @@ void ipack_driver_unregister(struct ipack_driver *edrv);
* *
* @bus: ipack bus device it is plugged to. * @bus: ipack bus device it is plugged to.
* @slot: slot position in the bus device. * @slot: slot position in the bus device.
* @irqv: IRQ vector for the mezzanine.
* *
* Register a new ipack device (mezzanine device). The call is done by * Register a new ipack device (mezzanine device). The call is done by
* the carrier device driver. * the carrier device driver.
*/ */
struct ipack_device *ipack_device_register(struct ipack_bus_device *bus, struct ipack_device *ipack_device_register(struct ipack_bus_device *bus, int slot);
int slot, int irqv);
void ipack_device_unregister(struct ipack_device *dev); void ipack_device_unregister(struct ipack_device *dev);
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment