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


Pavel Machek
 

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.

Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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