diff options
Diffstat (limited to 'drivers/vme/bridges/vme_ca91cx42.c')
-rw-r--r-- | drivers/vme/bridges/vme_ca91cx42.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/vme/bridges/vme_ca91cx42.c b/drivers/vme/bridges/vme_ca91cx42.c index 9f2c834e43e0..6b5ee896af63 100644 --- a/drivers/vme/bridges/vme_ca91cx42.c +++ b/drivers/vme/bridges/vme_ca91cx42.c @@ -47,6 +47,8 @@ static const struct pci_device_id ca91cx42_ids[] = { { }, }; +MODULE_DEVICE_TABLE(pci, ca91cx42_ids); + static struct pci_driver ca91cx42_driver = { .name = driver_name, .id_table = ca91cx42_ids, @@ -69,7 +71,7 @@ static u32 ca91cx42_LM_irqhandler(struct ca91cx42_driver *bridge, u32 stat) for (i = 0; i < 4; i++) { if (stat & CA91CX42_LINT_LM[i]) { /* We only enable interrupts if the callback is set */ - bridge->lm_callback[i](i); + bridge->lm_callback[i](bridge->lm_data[i]); serviced |= CA91CX42_LINT_LM[i]; } } @@ -1410,7 +1412,7 @@ static int ca91cx42_lm_get(struct vme_lm_resource *lm, * Callback will be passed the monitor triggered. */ static int ca91cx42_lm_attach(struct vme_lm_resource *lm, int monitor, - void (*callback)(int)) + void (*callback)(void *), void *data) { u32 lm_ctl, tmp; struct ca91cx42_driver *bridge; @@ -1438,6 +1440,7 @@ static int ca91cx42_lm_attach(struct vme_lm_resource *lm, int monitor, /* Attach callback */ bridge->lm_callback[monitor] = callback; + bridge->lm_data[monitor] = data; /* Enable Location Monitor interrupt */ tmp = ioread32(bridge->base + LINT_EN); @@ -1477,6 +1480,7 @@ static int ca91cx42_lm_detach(struct vme_lm_resource *lm, int monitor) /* Detach callback */ bridge->lm_callback[monitor] = NULL; + bridge->lm_data[monitor] = NULL; /* If all location monitors disabled, disable global Location Monitor */ if ((tmp & (CA91CX42_LINT_LM0 | CA91CX42_LINT_LM1 | CA91CX42_LINT_LM2 | |