Re: [PATCH 4.19.y-cip 05/12] phy: renesas: rcar-gen3-usb2: add conditions for uses_otg_pins == false


Biju Das <biju.das@...>
 

HI Pavel,

Thanks for the feedback.

-----Original Message-----
From: Pavel Machek <pavel@...>
Sent: Tuesday, July 16, 2019 1:05 PM
To: Biju Das <biju.das@...>
Cc: cip-dev@...
Subject: Re: [cip-dev] [PATCH 4.19.y-cip 05/12] phy: renesas: rcar-gen3-usb2:
add conditions for uses_otg_pins == false

Hi!

@@ -212,6 +212,9 @@ static void
rcar_gen3_init_from_a_peri_to_a_host(struct rcar_gen3_chan *ch)

static bool rcar_gen3_check_id(struct rcar_gen3_chan *ch) {
+ if (!ch->uses_otg_pins)
+ return (ch->dr_mode == USB_DR_MODE_HOST) ? false :
true;

I'd write this as

"return ch->dr_mode != USB_DR_MODE_HOST;"

I'll take the patch, anyway, but there's room for future cleanup.
Yes I agree. There is a room for improvement in future.

Regards,
Biju

Join cip-dev@lists.cip-project.org to automatically receive all group messages.