[PATCH][TRIVIAL] mfd: twl6030: Add intermediate cast to uintptr_t before casting to pointer.

From: Krzysztof Wilczynski
Date: Wed Apr 25 2012 - 19:32:45 EST


This is to address the following warning during compilation time:

drivers/mfd/twl6030-irq.c: In function âtwl6030_init_irqâ:
drivers/mfd/twl6030-irq.c:398: warning: cast to pointer from integer of different size
drivers/mfd/twl6030-irq.c:415: warning: cast to pointer from integer of different size

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@xxxxxxxxx>
---
drivers/mfd/twl6030-irq.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c
index b76902f..ddaed2d 100644
--- a/drivers/mfd/twl6030-irq.c
+++ b/drivers/mfd/twl6030-irq.c
@@ -395,7 +395,7 @@ int twl6030_init_irq(struct device *dev, int irq_num)
for (i = irq_base; i < irq_end; i++) {
irq_set_chip_and_handler(i, &twl6030_irq_chip,
handle_simple_irq);
- irq_set_chip_data(i, (void *)irq_num);
+ irq_set_chip_data(i, (void *)(uintptr_t)irq_num);
activate_irq(i);
}

@@ -412,7 +412,7 @@ int twl6030_init_irq(struct device *dev, int irq_num)
goto fail_irq;
}

- task = kthread_run(twl6030_irq_thread, (void *)irq_num, "twl6030-irq");
+ task = kthread_run(twl6030_irq_thread, (void *)(uintptr_t)irq_num, "twl6030-irq");
if (IS_ERR(task)) {
dev_err(dev, "could not create irq %d thread!\n", irq_num);
status = PTR_ERR(task);
--
1.7.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/