summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-11-21 16:00:28 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-11-21 19:01:05 +0000
commitf8d5e5a8f5be475796c7f357e43546c2d7f44540 (patch)
tree39a9be12ecee97de5809922be790fa73ee0d2f94 /drivers/i2c
parent1508c99506b5d57b8892a5d759176000c88c93b6 (diff)
ARM: PNX4008: i2c-pnx: use the same dev_id for request_irq and free_irq
This allows i2c-pnx to free its interrupt handler when the module is removed or if an error occurs; using the same dev_id for both request_irq and free_irq is desirable. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-pnx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c
index 1fca59077949..fbab6846ae64 100644
--- a/drivers/i2c/busses/i2c-pnx.c
+++ b/drivers/i2c/busses/i2c-pnx.c
@@ -650,7 +650,7 @@ static int __devinit i2c_pnx_probe(struct platform_device *pdev)
return 0;
out_irq:
- free_irq(alg_data->irq, alg_data);
+ free_irq(alg_data->irq, i2c_pnx->adapter);
out_clock:
i2c_pnx->set_clock_stop(pdev);
out_unmap:
@@ -669,7 +669,7 @@ static int __devexit i2c_pnx_remove(struct platform_device *pdev)
struct i2c_adapter *adap = i2c_pnx->adapter;
struct i2c_pnx_algo_data *alg_data = adap->algo_data;
- free_irq(alg_data->irq, alg_data);
+ free_irq(alg_data->irq, i2c_pnx->adapter);
i2c_del_adapter(adap);
i2c_pnx->set_clock_stop(pdev);
iounmap((void *)alg_data->ioaddr);