aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2013-12-19 10:05:05 -0500
committerWolfram Sang <wsa@the-dreams.de>2014-01-04 17:34:29 -0500
commit617bdcbc3cb2c828771c2632bd8d57f7df5eea5c (patch)
treebf374b6498136941710989a94774d054d9c3c3a5 /drivers/i2c
parentf1e9f89aa92435ba5f1176b6152e848227f7adf8 (diff)
i2c: xilinx: Do not enable irq before irq handler
IRQ handler has to be register first before IRQ is enabled in xiic_reinit(). Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-xiic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c
index 5e5fae7d87f2..2d559896c678 100644
--- a/drivers/i2c/busses/i2c-xiic.c
+++ b/drivers/i2c/busses/i2c-xiic.c
@@ -731,8 +731,6 @@ static int xiic_i2c_probe(struct platform_device *pdev)
731 i2c->adap.dev.parent = &pdev->dev; 731 i2c->adap.dev.parent = &pdev->dev;
732 i2c->adap.dev.of_node = pdev->dev.of_node; 732 i2c->adap.dev.of_node = pdev->dev.of_node;
733 733
734 xiic_reinit(i2c);
735
736 spin_lock_init(&i2c->lock); 734 spin_lock_init(&i2c->lock);
737 init_waitqueue_head(&i2c->wait); 735 init_waitqueue_head(&i2c->wait);
738 ret = request_irq(irq, xiic_isr, 0, pdev->name, i2c); 736 ret = request_irq(irq, xiic_isr, 0, pdev->name, i2c);
@@ -741,6 +739,8 @@ static int xiic_i2c_probe(struct platform_device *pdev)
741 goto request_irq_failed; 739 goto request_irq_failed;
742 } 740 }
743 741
742 xiic_reinit(i2c);
743
744 /* add i2c adapter to i2c tree */ 744 /* add i2c adapter to i2c tree */
745 ret = i2c_add_adapter(&i2c->adap); 745 ret = i2c_add_adapter(&i2c->adap);
746 if (ret) { 746 if (ret) {