On January 19, 2019 3:30:05 AM PST, Heiner Kallweit <hkallwe...@gmail.com> 
wrote:
>Now that we enable the interrupts in phy_start() we don't have to do it
>before. Therefore remove enabling interrupts from
>phy_start_interrupts()
>and rename this function to reflect the changed functionality.
>
>Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
>---

>+ * phy_request_interrupt - request interrupt for a PHY device
>  * @phydev: target phy_device struct
>  *
>  * Description: Request the interrupt for the given PHY.
>  *   If this fails, then we set irq to PHY_POLL.
>- *   Otherwise, we enable the interrupts in the PHY.
>  *   This should only be called with a valid IRQ number.
>- *   Returns 0 on success or < 0 on error.
>  */
>-int phy_start_interrupts(struct phy_device *phydev)
>+void phy_request_interrupt(struct phy_device *phydev)
> {
>       if (request_threaded_irq(phydev->irq, NULL, phy_interrupt,
>                                IRQF_ONESHOT | IRQF_SHARED,
>                                phydev_name(phydev), phydev) < 0) {
>               phydev_warn(phydev, "Can't get IRQ %d\n", phydev->irq);
>               phydev->irq = PHY_POLL;
>-              return 0;
>       }

We should propagate the return code here and/or indicate we are falling back to 
polling since may not be desired. An use case that should be considered is 
probe deferral for instance.
-- 
Florian

Reply via email to