linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
	linux-usb@vger.kernel.org, stable@vger.kernel.org
Subject: usb: typec: Registering real device entries for the muxes
Date: Mon, 1 Apr 2019 12:34:29 +0200	[thread overview]
Message-ID: <20190401103429.GA12128@kroah.com> (raw)

On Mon, Apr 01, 2019 at 01:15:53PM +0300, Heikki Krogerus wrote:
> Registering real device entries (struct device) for the mode
> muxes as well as for the orientation switches.
> 
> The Type-C mux code was deliberately attempting to avoid
> creation of separate device entries for the orientation
> switch and the mode switch (alternate modes) because they
> are not physical devices. They are functions of a single
> physical multiplexer/demultiplexer switch device.
> 
> Unfortunately because of the dependency we still have on the
> underlying mux device driver, we had to put in hacks like
> the one in the commit 3e3b81965cbf ("usb: typec: mux: Take
> care of driver module reference counting") to make sure the
> driver does not disappear from underneath us. Even with
> those hacks we were still left with a potential NUll pointer
> dereference scenario, so just creating the device entries,
> and letting the core take care of the dependencies. No more
> hacks needed.
> 
> Fixes: 3e3b81965cbf ("usb: typec: mux: Take care of driver module reference counting")
> Cc: v4.19.x <stable@vger.kernel.org> # v4.19.x+
> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

This looks good to me, nice work!

But, it would be nice if someone who has this hardware can test it to
verify it does actually work :)

thanks,

greg k-h

             reply	other threads:[~2019-04-01 10:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-01 10:34 Greg Kroah-Hartman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-04-03 10:29 usb: typec: Registering real device entries for the muxes Heikki Krogerus
2019-04-02 12:47 Heikki Krogerus
2019-04-02  7:35 kbuild test robot
2019-04-01 12:45 Hans de Goede
2019-04-01 12:40 Heikki Krogerus
2019-04-01 10:15 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=20190401103429.GA12128@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=stable@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).