Skip to content

Commit 9bee8ed

Browse files
spi: adi: Updating IRQ request API
Updating/correcting API for irq resource registration. Signed-off-by: UtsavAgarwalADI <utsav.agarwal@analog.com>
1 parent db33e40 commit 9bee8ed

File tree

1 file changed

+6
-21
lines changed

1 file changed

+6
-21
lines changed

drivers/spi/spi-adi.c

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -728,15 +728,8 @@ static int adi_spi_probe(struct platform_device *pdev)
728728
struct spi_controller *controller;
729729
struct adi_spi_controller *drv_data;
730730
struct resource *mem;
731-
struct irq_domain *irq_domain;
732-
struct device_node *irq_of_node;
733-
struct irq_fwspec spi_fwspec = {
734-
.param_count = 3,
735-
.param = {0, 132, 4},
736-
};
737-
int virq;
738731
struct clk *sclk;
739-
int ret;
732+
int ret, err_irq;
740733

741734
sclk = devm_clk_get(dev, "spi");
742735
if (IS_ERR(sclk)) {
@@ -781,21 +774,13 @@ static int adi_spi_probe(struct platform_device *pdev)
781774
return PTR_ERR(drv_data->regs);
782775
}
783776

784-
irq_of_node = of_find_node_by_name(NULL,"interrupt-controller");
785-
if (!irq_of_node) {
786-
dev_err(dev, "could not find node interrupt-controller\n");
787-
return -ENODEV;
788-
}
789-
790-
irq_domain = irq_find_host(irq_of_node);
791-
if(!irq_domain) {
792-
dev_err(dev, "could not get irq domain from interrupt-controller\n");
793-
return -ENODATA;
777+
err_irq = platform_get_irq(pdev, 0);
778+
if (!err_irq) {
779+
dev_err(dev, "No SPI error irq resource found\n");
780+
return -ENODEV;
794781
}
795782

796-
spi_fwspec.fwnode = irq_domain->fwnode;
797-
virq = irq_create_fwspec_mapping(&spi_fwspec);
798-
ret = devm_request_irq(dev, virq, spi_irq_err, 0, "SPI ERROR", drv_data);
783+
ret = devm_request_irq(dev, err_irq, spi_irq_err, 0, "SPI ERROR", drv_data);
799784
if (ret) {
800785
dev_err(dev, "could not request spi error irq\n");
801786
return ret;

0 commit comments

Comments
 (0)