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>
This commit is contained in:
Родитель
f1e9f89aa9
Коммит
617bdcbc3c
|
@ -731,8 +731,6 @@ static int xiic_i2c_probe(struct platform_device *pdev)
|
|||
i2c->adap.dev.parent = &pdev->dev;
|
||||
i2c->adap.dev.of_node = pdev->dev.of_node;
|
||||
|
||||
xiic_reinit(i2c);
|
||||
|
||||
spin_lock_init(&i2c->lock);
|
||||
init_waitqueue_head(&i2c->wait);
|
||||
ret = request_irq(irq, xiic_isr, 0, pdev->name, i2c);
|
||||
|
@ -741,6 +739,8 @@ static int xiic_i2c_probe(struct platform_device *pdev)
|
|||
goto request_irq_failed;
|
||||
}
|
||||
|
||||
xiic_reinit(i2c);
|
||||
|
||||
/* add i2c adapter to i2c tree */
|
||||
ret = i2c_add_adapter(&i2c->adap);
|
||||
if (ret) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче