Re: [PATCH v2 4/5] usb: dwc3: gadget: save state of pullups

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

 



Hi,

On Fri, Feb 08, 2013 at 08:35:09PM +0300, Sergei Shtylyov wrote:
> >>> @@ -1425,8 +1425,10 @@ static int dwc3_gadget_run_stop(struct dwc3 *dwc, int is_on)
> >>>  		if (dwc->revision >= DWC3_REVISION_194A)
> >>>  			reg &= ~DWC3_DCTL_KEEP_CONNECT;
> >>>  		reg |= DWC3_DCTL_RUN_STOP;
> >>> +		dwc->pullups_connected = true;
> >>>  	} else {
> >>>  		reg &= ~DWC3_DCTL_RUN_STOP;
> >>> +		dwc->pullups_connected = false;
> 
> >>   Maybe worth declaring the field as 'bool' if you assign 'bool' values?
> 
> > I prefer my 1-bit flags ;-)
> 
>    Hm, I thought 'bool' can be made 1-bit too...

you mean bool flag:1; ? Well, then it makes no real difference, right ?

besides, all other flags are already unsigned flag:1, so I'll keep it
that way.

cheers

-- 
balbi

Attachment: signature.asc
Description: Digital signature


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

  Powered by Linux