[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <536B52C3.3010109@gmail.com>
Date: Thu, 08 May 2014 11:47:47 +0200
From: Daniel Mack <zonque@...il.com>
To: George Cherian <george.cherian@...com>,
linux-kernel@...r.kernel.org, linux-omap@...r.kernel.org,
linux-usb@...r.kernel.org
CC: balbi@...com, gregkh@...uxfoundation.org
Subject: Re: [PATCH v2 3/5] usb: musb: core: Convert the musb_platform_reset
to have a return value.
Hi Geroge,
On 05/08/2014 11:35 AM, George Cherian wrote:
> -static inline void musb_platform_reset(struct musb *musb)
> +static inline int musb_platform_reset(struct musb *musb)
> {
> - if (musb->ops->reset)
> - musb->ops->reset(musb);
> + if (!musb->ops->reset)
> + return -EINVAL;
> +
> + return musb->ops->reset(musb);
> }
>
> static inline int musb_platform_get_vbus_status(struct musb *musb)
> diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
> index 74c4193..8438200 100644
> --- a/drivers/usb/musb/musb_dsps.c
> +++ b/drivers/usb/musb/musb_dsps.c
> @@ -536,7 +536,7 @@ static int dsps_musb_set_mode(struct musb *musb, u8 mode)
> return 0;
> }
>
> -static void dsps_musb_reset(struct musb *musb)
> +static int dsps_musb_reset(struct musb *musb)
> {
> struct device *dev = musb->controller;
> struct dsps_glue *glue = dev_get_drvdata(dev->parent);
> @@ -548,6 +548,7 @@ static void dsps_musb_reset(struct musb *musb)
> usleep_range(100, 200);
> usb_phy_init(musb->xceiv);
>
> + return 1;
Could we follow the general kernel rule here and return 0 for success,
and < 0 on failure?
Thanks,
Daniel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists