All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Chunfeng Yun <chunfeng.yun@mediatek.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Benson Leung <bleung@chromium.org>,
	Prashant Malani <pmalani@chromium.org>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH 4/9] usb: roles: Leave the private driver data pointer to the drivers
Date: Mon, 17 Feb 2020 11:16:43 +0200	[thread overview]
Message-ID: <20200217091643.GC28776@kuha.fi.intel.com> (raw)
In-Reply-To: <1581758398.3473.3.camel@mhfsdcap03>

On Sat, Feb 15, 2020 at 05:19:58PM +0800, Chunfeng Yun wrote:
> On Thu, 2020-02-13 at 16:24 +0300, Heikki Krogerus wrote:
> > Adding usb_role_switch_get/set_drvdata() functions that the
> > switch drivers can use for setting and getting private data
> > pointer that is associated with the switch.
> > 
> > Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> > ---
> >  drivers/usb/roles/class.c | 22 ++++++++++++++++++++++
> >  include/linux/usb/role.h  | 16 ++++++++++++++++
> >  2 files changed, 38 insertions(+)
> > 
> > diff --git a/drivers/usb/roles/class.c b/drivers/usb/roles/class.c
> > index 63a00ff26655..f3132d231599 100644
> > --- a/drivers/usb/roles/class.c
> > +++ b/drivers/usb/roles/class.c
> > @@ -329,6 +329,7 @@ usb_role_switch_register(struct device *parent,
> >  	sw->dev.fwnode = desc->fwnode;
> >  	sw->dev.class = role_class;
> >  	sw->dev.type = &usb_role_dev_type;
> > +	sw->dev.driver_data = desc->driver_data;
> How about use dev_set_drvdata()? will keep align with
> usb_role_switch_set/get_drvdata(), 

Yes, makes sense. I'll change that.

Thanks,

-- 
heikki

  reply	other threads:[~2020-02-17  9:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13 13:24 [PATCH 0/9] usb: typec: Driver for Intel PMC Mux-Agent Heikki Krogerus
2020-02-13 13:24 ` [PATCH 1/9] usb: typec: mux: Allow the muxes to be named Heikki Krogerus
2020-02-13 13:24 ` [PATCH 2/9] usb: typec: mux: Add helpers for setting the mux state Heikki Krogerus
2020-02-13 13:24 ` [PATCH 3/9] usb: typec: mux: Allow the mux handles to be requested with fwnode Heikki Krogerus
2020-02-13 13:24 ` [PATCH 4/9] usb: roles: Leave the private driver data pointer to the drivers Heikki Krogerus
2020-02-15  9:19   ` Chunfeng Yun
2020-02-17  9:16     ` Heikki Krogerus [this message]
2020-02-13 13:24 ` [PATCH 5/9] usb: roles: Provide the switch drivers handle to the switch in the API Heikki Krogerus
2020-02-13 13:32   ` Heikki Krogerus
2020-02-18  7:23     ` Peter Chen
2020-02-18 12:25       ` Heikki Krogerus
2020-02-19  1:58         ` Peter Chen
2020-02-19 13:38           ` Heikki Krogerus
2020-02-19 14:09             ` Peter Chen
2020-02-19 14:14               ` Heikki Krogerus
2020-02-15  9:33   ` Chunfeng Yun
2020-02-13 13:24 ` [PATCH 6/9] usb: roles: Allow the role switches to be named Heikki Krogerus
2020-02-13 13:24 ` [PATCH 7/9] device property: Export fwnode_get_name() Heikki Krogerus
2020-02-13 13:24 ` [PATCH 8/9] usb: typec: Add definitions for Thunderbolt 3 Alternate Mode Heikki Krogerus
2020-02-13 13:24 ` [PATCH 9/9] usb: typec: driver for Intel PMC mux control Heikki Krogerus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200217091643.GC28776@kuha.fi.intel.com \
    --to=heikki.krogerus@linux.intel.com \
    --cc=bleung@chromium.org \
    --cc=chunfeng.yun@mediatek.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=pmalani@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.