msm: kgsl: Use a consolidated IRQ handler
For some reason while everything else in KGSL was organized into
the kgsl_device hooks the chip specific interrupt handler pointer
was being passed through the device registration function. Make
the IRQ handler work the same way as the other hooks. this reduces
the complexity and reduces the chip specific variables passed into
the generic registration to just one pointer.
Change-Id: Ic0dedbadff1641cbca80593e91744dbb6dcfd2cc
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
diff --git a/drivers/gpu/msm/kgsl.c b/drivers/gpu/msm/kgsl.c
index e38037c..321c59e 100644
--- a/drivers/gpu/msm/kgsl.c
+++ b/drivers/gpu/msm/kgsl.c
@@ -2295,6 +2295,14 @@
return 0;
}
+static irqreturn_t kgsl_irq_handler(int irq, void *data)
+{
+ struct kgsl_device *device = data;
+
+ return device->ftbl->irq_handler(device);
+
+}
+
static const struct file_operations kgsl_fops = {
.owner = THIS_MODULE,
.release = kgsl_release,
@@ -2455,8 +2463,7 @@
}
EXPORT_SYMBOL(kgsl_register_device);
-int kgsl_device_platform_probe(struct kgsl_device *device,
- irqreturn_t (*dev_isr) (int, void*))
+int kgsl_device_platform_probe(struct kgsl_device *device)
{
int result;
int status = -EINVAL;
@@ -2504,7 +2511,7 @@
goto error_release_mem;
}
- status = request_irq(device->pwrctrl.interrupt_num, dev_isr,
+ status = request_irq(device->pwrctrl.interrupt_num, kgsl_irq_handler,
IRQF_TRIGGER_HIGH, device->name, device);
if (status) {
KGSL_DRV_ERR(device, "request_irq(%d) failed: %d\n",