@@ -728,15 +728,8 @@ static int adi_spi_probe(struct platform_device *pdev)
728
728
struct spi_controller * controller ;
729
729
struct adi_spi_controller * drv_data ;
730
730
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 ;
738
731
struct clk * sclk ;
739
- int ret ;
732
+ int ret , err_irq ;
740
733
741
734
sclk = devm_clk_get (dev , "spi" );
742
735
if (IS_ERR (sclk )) {
@@ -781,21 +774,13 @@ static int adi_spi_probe(struct platform_device *pdev)
781
774
return PTR_ERR (drv_data -> regs );
782
775
}
783
776
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 ;
794
781
}
795
782
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 );
799
784
if (ret ) {
800
785
dev_err (dev , "could not request spi error irq\n" );
801
786
return ret ;
0 commit comments