Re: [PATCH v3 1/9] usb: typec: Copy everything from struct typec_capability during registration

2019-10-09 Thread Heikki Krogerus
On Tue, Oct 08, 2019 at 01:44:28PM -0700, Guenter Roeck wrote: > > @@ -1579,9 +1581,10 @@ struct typec_port *typec_register_port(struct device > > *parent, > > mutex_init(&port->port_type_lock); > > > > port->id = id; > > - port->cap = cap; > > + port->orig_cap = cap; > > port->p

Re: [PATCH v3 1/9] usb: typec: Copy everything from struct typec_capability during registration

2019-10-08 Thread Guenter Roeck
On Tue, Oct 08, 2019 at 02:13:42PM +0300, Heikki Krogerus wrote: > Copying everything from struct typec_capability to struct > typec_port during port registration. This will make sure > that under no circumstances the driver can change the values > in the struct typec_capability that the port uses.