USB: isp1362: fix build failure on ARM systems via irq_flags cleanup

There was some left over #ifdef ARM logic that is outdated but no one
really noticed. So instead of relying on this tricky logic, properly
load and utilize the platform irq_flags resources.

Reported-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Lothar Wassmann <LW@KARO-electronics.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by Lothar Wassmann and committed by Greg Kroah-Hartman 0a2fea2e 96b85179

+14 -7
+14 -7
drivers/usb/host/isp1362-hcd.c
··· 2697 2697 void __iomem *data_reg; 2698 2698 int irq; 2699 2699 int retval = 0; 2700 + struct resource *irq_res; 2701 + unsigned int irq_flags = 0; 2700 2702 2701 2703 /* basic sanity checks first. board-specific init logic should 2702 2704 * have initialized this the three resources and probably board ··· 2712 2710 2713 2711 data = platform_get_resource(pdev, IORESOURCE_MEM, 0); 2714 2712 addr = platform_get_resource(pdev, IORESOURCE_MEM, 1); 2715 - irq = platform_get_irq(pdev, 0); 2716 - if (!addr || !data || irq < 0) { 2713 + irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); 2714 + if (!addr || !data || !irq_res) { 2717 2715 retval = -ENODEV; 2718 2716 goto err1; 2719 2717 } 2718 + irq = irq_res->start; 2720 2719 2721 2720 #ifdef CONFIG_USB_HCD_DMA 2722 2721 if (pdev->dev.dma_mask) { ··· 2784 2781 } 2785 2782 #endif 2786 2783 2787 - #ifdef CONFIG_ARM 2788 - if (isp1362_hcd->board) 2789 - set_irq_type(irq, isp1362_hcd->board->int_act_high ? IRQT_RISING : IRQT_FALLING); 2790 - #endif 2784 + if (irq_res->flags & IORESOURCE_IRQ_HIGHEDGE) 2785 + irq_flags |= IRQF_TRIGGER_RISING; 2786 + if (irq_res->flags & IORESOURCE_IRQ_LOWEDGE) 2787 + irq_flags |= IRQF_TRIGGER_FALLING; 2788 + if (irq_res->flags & IORESOURCE_IRQ_HIGHLEVEL) 2789 + irq_flags |= IRQF_TRIGGER_HIGH; 2790 + if (irq_res->flags & IORESOURCE_IRQ_LOWLEVEL) 2791 + irq_flags |= IRQF_TRIGGER_LOW; 2791 2792 2792 - retval = usb_add_hcd(hcd, irq, IRQF_TRIGGER_LOW | IRQF_DISABLED | IRQF_SHARED); 2793 + retval = usb_add_hcd(hcd, irq, irq_flags | IRQF_DISABLED | IRQF_SHARED); 2793 2794 if (retval != 0) 2794 2795 goto err6; 2795 2796 pr_info("%s, irq %d\n", hcd->product_desc, irq);