{
struct dwc2_hsotg *hsotg = dev;
u32 gintsts;
- int retval = 0;
+ irqreturn_t retval = IRQ_NONE;
if (dwc2_check_core_status(hsotg) < 0) {
dev_warn(hsotg->dev, "Controller is disconnected\n");
gintsts = dwc2_read_common_intr(hsotg);
if (gintsts & ~GINTSTS_PRTINT)
- retval = 1;
+ retval = IRQ_HANDLED;
if (gintsts & GINTSTS_MODEMIS)
dwc2_handle_mode_mismatch_intr(hsotg);
spin_unlock(&hsotg->lock);
out:
- return IRQ_RETVAL(retval);
+ return retval;
}
EXPORT_SYMBOL_GPL(dwc2_handle_common_intr);
static irqreturn_t _dwc2_hcd_irq(struct usb_hcd *hcd)
{
struct dwc2_hsotg *hsotg = dwc2_hcd_to_hsotg(hcd);
- int retval = dwc2_hcd_intr(hsotg);
- return IRQ_RETVAL(retval);
+ return dwc2_hcd_intr(hsotg);
}
/*
*
* @hsotg: The DWC2 HCD
*
- * Returns non zero if interrupt is handled
- * Return 0 if interrupt is not handled
+ * Returns IRQ_HANDLED if interrupt is handled
+ * Return IRQ_NONE if interrupt is not handled
*/
-extern int dwc2_hcd_intr(struct dwc2_hsotg *hsotg);
+extern irqreturn_t dwc2_hcd_intr(struct dwc2_hsotg *hsotg);
/**
* dwc2_hcd_stop() - Halts the DWC_otg host mode operation
}
/* This function handles interrupts for the HCD */
-int dwc2_hcd_intr(struct dwc2_hsotg *hsotg)
+irqreturn_t dwc2_hcd_intr(struct dwc2_hsotg *hsotg)
{
u32 gintsts, dbg_gintsts;
- int retval = 0;
+ irqreturn_t retval = IRQ_NONE;
if (dwc2_check_core_status(hsotg) < 0) {
dev_warn(hsotg->dev, "Controller is disconnected\n");
- return 0;
+ return retval;
}
spin_lock(&hsotg->lock);
gintsts = dwc2_read_core_intr(hsotg);
if (!gintsts) {
spin_unlock(&hsotg->lock);
- return 0;
+ return retval;
}
- retval = 1;
+ retval = IRQ_HANDLED;
dbg_gintsts = gintsts;
#ifndef DEBUG_SOF