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] [day] [month] [year] [list]
Message-ID: <CAHp75VfJi2a4pBu_3qE=nsRZ=5udSNZ6gsKct6sB51WPvQAA3Q@mail.gmail.com>
Date:   Sat, 4 Jul 2020 13:05:57 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Sungbo Eo <mans0n@...ani.run>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Michael Walle <michael@...le.cc>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>
Subject: Re: [PATCH v4 1/2] gpio: add GPO driver for PCA9570

On Fri, Jul 3, 2020 at 3:13 AM Sungbo Eo <mans0n@...ani.run> wrote:
> On 2020-07-02 21:36, Andy Shevchenko wrote:
> >> +       gpio->chip.ngpio = i2c_match_id(pca9570_id_table, client)->driver_data;
> >
> > Oh, avoid direct access to the table like this. And you may simply use
> > device_get_match_data().
>
> I'm not sure if it really does the same thing, but I'll try following
> your suggestion.

It's an agnostic way to get it from fwnode enumerated devices. Since
you are using ->probe_new() the driver should rely on fwnode, that's
why the OF table has to have driver data be defined.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ