Re: [PATCH] usb: typec: Registering real device entries for the muxes

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

 



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@xxxxxxxxxxxxxxx> # v4.19.x+
> Signed-off-by: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx>

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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux