lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 28 Jan 2019 17:28:30 +0200
From:   Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Chen Yu <chenyu56@...wei.com>, Jun Li <jun.li@....com>,
        Hans de Goede <hdegoede@...hat.com>,
        USB <linux-usb@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/8] usb: typec: Rationalize the API for the muxes

On Mon, Jan 28, 2019 at 11:50:31AM +0200, Andy Shevchenko wrote:
> On Fri, Jan 25, 2019 at 3:18 PM Heikki Krogerus
> <heikki.krogerus@...ux.intel.com> wrote:
> >
> > We can replace the second parameter that is passed to the
> > typec_mux_get() function with alt mode description
> > structure, and simply pass NULL with accessory modes.
> >
> > With accessory modes there is no need for additional
> > identification (in practice the accessory mode can only be
> > Audio Accessory if muxing is needed), only with alternate
> > modes we need to identify the exact alternate mode.
> 
> > +struct typec_mux *typec_mux_get(struct device *dev,
> > +                               const struct typec_altmode_desc *desc)
> >  {
> >         struct typec_mux *mux;
> >
> >         mutex_lock(&mux_lock);
> > -       mux = device_connection_find_match(dev, name, NULL, typec_mux_match);
> > +       mux = device_connection_find_match(dev, "typec-mux", (void *)desc,
> > +                                          typec_mux_match);
> 
> Not related to this series, but shouldn't
> device_connection_find_match() be improved to avoid dropping const
> qualifier?

I'll see if we can do that already.

thanks,

-- 
heikki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ