Re: [PATCH] usb: usb251xb: check if hub is already attached

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On Thu, Feb 27, 2020 at 09:30:07AM +0100, Richard Leitner wrote:
> On Thu, Feb 27, 2020 at 09:14:48AM +0100, Uwe Kleine-König wrote:
> > If you write this as:
> > 
> > 	if (!hub->gpio_reset && usb251xb_hub_attached(hub))
> > 		return 0;
> > 
> > you save some i2c transfers in the presence of a reset gpio.
> 
> I'd also go with this solution, so you only have i2c transfers when a
> reset gpio is configured/present.

Nitpick: you only have additional i2c transfers if *no* reset gpio is
configured/present.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux