Unverified Commit 8c8b9618 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!15787 i2c: npcm: disable interrupt enable bit before devm_request_irq

parents 80e04fb7 6949727c
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -2333,6 +2333,13 @@ static int npcm_i2c_probe_bus(struct platform_device *pdev)
	if (irq < 0)
	if (irq < 0)
		return irq;
		return irq;


	/*
	 * Disable the interrupt to avoid the interrupt handler being triggered
	 * incorrectly by the asynchronous interrupt status since the machine
	 * might do a warm reset during the last smbus/i2c transfer session.
	 */
	npcm_i2c_int_enable(bus, false);

	ret = devm_request_irq(bus->dev, irq, npcm_i2c_bus_irq, 0,
	ret = devm_request_irq(bus->dev, irq, npcm_i2c_bus_irq, 0,
			       dev_name(bus->dev), bus);
			       dev_name(bus->dev), bus);
	if (ret)
	if (ret)