Re: [PATCH v4 2/3] usb: gadget: introduce gadget state tracking

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

 



Hi,

On Fri, Jan 25, 2013 at 10:27:24AM -0500, Alan Stern wrote:
> On Fri, 25 Jan 2013, Felipe Balbi wrote:
> 
> > I guess it would be good to have a:
> > 
> > enum usb_gadget_state usb_gadget_get_state(struct usb_gadget *gadget)
> > {
> > 	return gadget->state;
> > }
> > 
> > right ?? At least dwc3 can make use of it.
> 
> This seems like unnecessary embellishment.  What's wrong with typing
> 
> 	gadget->state
> 
> instead of
> 
> 	usb_gadget_get_state(gadget)
> 
> ?  Do you have some reason to think the "state" field will need further 
> encapsulation in the future?

not really, just that a setter() usually follows up a getter(). But...
meh... no strong feelings

-- 
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