Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S980347AbdDYFXv (ORCPT ); Tue, 25 Apr 2017 01:23:51 -0400 Received: from mail-qk0-f171.google.com ([209.85.220.171]:35199 "EHLO mail-qk0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S972766AbdDYFXn (ORCPT ); Tue, 25 Apr 2017 01:23:43 -0400 MIME-Version: 1.0 In-Reply-To: References: <402abd5e-9357-84e8-56fe-8758d119a0b6@gmail.com> <59fe76ac-4af3-3ac6-9c9c-68f802cf87c7@gmail.com> From: Guenter Roeck Date: Mon, 24 Apr 2017 22:23:41 -0700 Message-ID: Subject: Re: [PATCH v3] usb: typec: Don't prevent using constant typec_mode_desc initializers To: Mats Karrman Cc: Heikki Krogerus , Felipe Balbi , Guenter Roeck , linux-usb@vger.kernel.org, linux-kernel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3597 Lines: 96 On Mon, Apr 24, 2017 at 11:52 AM, Mats Karrman wrote: > Signed-off-by: Mats Karrman > --- > v3: > - Fixed damaged white-space, finally? > Yes, this one finally applied. Some description in addition to the subject line might be nice. Other than that, Reviewed-by: Guenter Roeck Guenter > v2: > - Fixed damaged white-space > - Added signed-off-by > > drivers/usb/typec/typec.c | 11 ++++++----- > include/linux/usb/typec.h | 6 +++--- > 2 files changed, 9 insertions(+), 8 deletions(-) > > diff --git a/drivers/usb/typec/typec.c b/drivers/usb/typec/typec.c > index 89e540b..db5ee73 100644 > --- a/drivers/usb/typec/typec.c > +++ b/drivers/usb/typec/typec.c > @@ -291,7 +291,7 @@ typec_altmode_roles_show(struct device *dev, struct device_attribute *attr, > } > > static void typec_init_modes(struct typec_altmode *alt, > - struct typec_mode_desc *desc, bool is_port) > + const struct typec_mode_desc *desc, bool is_port) > { > int i; > > @@ -378,7 +378,8 @@ static const struct device_type typec_altmode_dev_type = { > }; > > static struct typec_altmode * > -typec_register_altmode(struct device *parent, struct typec_altmode_desc *desc) > +typec_register_altmode(struct device *parent, > + const struct typec_altmode_desc *desc) > { > struct typec_altmode *alt; > int ret; > @@ -495,7 +496,7 @@ EXPORT_SYMBOL_GPL(typec_partner_set_identity); > */ > struct typec_altmode * > typec_partner_register_altmode(struct typec_partner *partner, > - struct typec_altmode_desc *desc) > + const struct typec_altmode_desc *desc) > { > return typec_register_altmode(&partner->dev, desc); > } > @@ -590,7 +591,7 @@ static const struct device_type typec_plug_dev_type = { > */ > struct typec_altmode * > typec_plug_register_altmode(struct typec_plug *plug, > - struct typec_altmode_desc *desc) > + const struct typec_altmode_desc *desc) > { > return typec_register_altmode(&plug->dev, desc); > } > @@ -1159,7 +1160,7 @@ EXPORT_SYMBOL_GPL(typec_set_pwr_opmode); > */ > struct typec_altmode * > typec_port_register_altmode(struct typec_port *port, > - struct typec_altmode_desc *desc) > + const struct typec_altmode_desc *desc) > { > return typec_register_altmode(&port->dev, desc); > } > diff --git a/include/linux/usb/typec.h b/include/linux/usb/typec.h > index ec78204..d1d2ebc 100644 > --- a/include/linux/usb/typec.h > +++ b/include/linux/usb/typec.h > @@ -117,13 +117,13 @@ struct typec_altmode_desc { > > struct typec_altmode > *typec_partner_register_altmode(struct typec_partner *partner, > - struct typec_altmode_desc *desc); > + const struct typec_altmode_desc *desc); > struct typec_altmode > *typec_plug_register_altmode(struct typec_plug *plug, > - struct typec_altmode_desc *desc); > + const struct typec_altmode_desc *desc); > struct typec_altmode > *typec_port_register_altmode(struct typec_port *port, > - struct typec_altmode_desc *desc); > + const struct typec_altmode_desc *desc); > void typec_unregister_altmode(struct typec_altmode *altmode); > > struct typec_port *typec_altmode2port(struct typec_altmode *alt); > -- > 2.1.4 >