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: <CA+U=DspTnzOeQexB4YiANBa+6N20uMPNQLDc+ntgW2bSxyHp=Q@mail.gmail.com>
Date:   Mon, 20 May 2019 11:49:48 +0300
From:   Alexandru Ardelean <ardeleanalex@...il.com>
To:     Jonathan Cameron <jic23@...nel.org>
Cc:     João Seckler <joaoseckler@...il.com>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Michael Hennerich <Michael.Hennerich@...log.com>,
        Stefan Popa <stefan.popa@...log.com>,
        Hartmut Knaack <knaack.h@....de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-iio@...r.kernel.org, devel@...verdev.osuosl.org,
        LKML <linux-kernel@...r.kernel.org>,
        Alexandru Ardelean <alexandru.ardelean@...log.com>
Subject: Re: [PATCH] staging: iio: ad9832: Add device tree support

On Sun, May 19, 2019 at 8:17 PM Jonathan Cameron <jic23@...nel.org> wrote:
>
> On Sat, 18 May 2019 17:48:25 -0300
> João Seckler <joaoseckler@...il.com> wrote:
>
> > Add a of_device_id struct variable and subsequent call to
> > MODULE_DEVICE_TABLE macro to support device tree.
> >
> > Signed-off-by: João Seckler <joaoseckler@...il.com>
> > Signed-off-by: Anderson Reis <andersonreisrosa@...il.com>
> > Co-developed-by: Anderson Reis  <andersonreisrosa@...il.com>
> > Signed-off-by: Andre Tadeu de Carvalho <andre.tadeu.de.carvalho@...il.com>
> > Co-developed-by: Andre Tadeu de Carvalho <andre.tadeu.de.carvalho@...il.com>
> Hi All,
>
> Missing the setting of the relevant entry in the spi_driver structure.
> Otherwise looks fine,
>
> Thanks,
>
> Jonathan
> > ---
> >  drivers/staging/iio/frequency/ad9832.c | 7 +++++++
> >  1 file changed, 7 insertions(+)
> >
> > diff --git a/drivers/staging/iio/frequency/ad9832.c b/drivers/staging/iio/frequency/ad9832.c
> > index 74308a2e72db..51e97c74c6b2 100644
> > --- a/drivers/staging/iio/frequency/ad9832.c
> > +++ b/drivers/staging/iio/frequency/ad9832.c
> > @@ -451,6 +451,13 @@ static int ad9832_remove(struct spi_device *spi)
> >       return 0;
> >  }
> >
> > +static const struct of_device_id ad9832_of_match[] = {
> > +     { .compatible = "adi,ad9832", },
> > +     { .compatible = "adi,ad9835", },
> > +     { /* sentinel */ },
> > +};
> > +MODULE_DEVICE_TABLE(of, ad9832_of_match);
> > +


Yep.
To clarify what Jonathan said (see line below with plus + ) :

static struct spi_driver ad9832_driver = {
        .driver = {
                .name   = "ad9832",
+              .of_match_table = ad9832_of_match,
        },
        .probe          = ad9832_probe,
        .remove         = ad9832_remove,
        .id_table       = ad9832_id,
};



> >  static const struct spi_device_id ad9832_id[] = {
> >       {"ad9832", 0},
> >       {"ad9835", 0},
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ