Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: bcm2835aux: change initialization order and switch to platform_get_irq

Change the initialization order of the HW so that the interrupt
is only requested after the HW is initialized

Also the use of irq_of_parse_and_map is replaced by platform_get_irq.

Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Martin Sperl and committed by
Mark Brown
07bce09e 72aac02b

+4 -4
+4 -4
drivers/spi/spi-bcm2835aux.c
··· 429 429 goto out_master_put; 430 430 } 431 431 432 - bs->irq = irq_of_parse_and_map(pdev->dev.of_node, 0); 432 + bs->irq = platform_get_irq(pdev, 0); 433 433 if (bs->irq <= 0) { 434 434 dev_err(&pdev->dev, "could not get IRQ: %d\n", bs->irq); 435 435 err = bs->irq ? bs->irq : -ENODEV; ··· 451 451 goto out_clk_disable; 452 452 } 453 453 454 + /* reset SPI-HW block */ 455 + bcm2835aux_spi_reset_hw(bs); 456 + 454 457 err = devm_request_irq(&pdev->dev, bs->irq, 455 458 bcm2835aux_spi_interrupt, 456 459 IRQF_SHARED, ··· 462 459 dev_err(&pdev->dev, "could not request IRQ: %d\n", err); 463 460 goto out_clk_disable; 464 461 } 465 - 466 - /* reset SPI-HW block */ 467 - bcm2835aux_spi_reset_hw(bs); 468 462 469 463 err = devm_spi_register_master(&pdev->dev, master); 470 464 if (err) {