lkml.org 
[lkml]   [2022]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v3 3/6] typec: mux: Introduce indirection
    On Thu, Mar 03, 2022 at 02:33:48PM -0800, Bjorn Andersson wrote:
    > Rather than directly exposing the implementation's representation of the
    > typec muxes to the controller/clients, introduce an indirection object.
    >
    > This enables the introduction of turning this relationship into a
    > one-to-many in the following patch.

    ...

    > + dev_set_name(&sw_dev->dev, "%s-switch",
    > desc->name ? desc->name : dev_name(parent));

    Besides a possible shorten form of

    dev_set_name(&sw_dev->dev, "%s-switch", desc->name ?: dev_name(parent));

    this lacks of the error checking (it seems in original code like this and
    should be fixed as preparatory patch for easy backporting).

    ...

    > + dev_set_name(&mux_dev->dev, "%s-mux",
    > desc->name ? desc->name : dev_name(parent));

    Ditto.

    --
    With Best Regards,
    Andy Shevchenko


    \
     
     \ /
      Last update: 2022-03-04 13:59    [W:2.228 / U:0.200 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site