[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <154178275324.88331.16237880990995819011@swboyd.mtv.corp.google.com>
Date: Fri, 09 Nov 2018 08:59:13 -0800
From: Stephen Boyd <sboyd@...nel.org>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Rob Herring <robh+dt@...nel.org>,
Michael Turquette <mturquette@...libre.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
linux-clk <linux-clk@...r.kernel.org>,
linux-mediatek@...ts.infradead.org,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
ryder.lee@...iatek.com, Frank Rowand <frowand.list@...il.com>
Subject: Re: [PATCH 1/4] of/device: Add a way to probe drivers by match data
Quoting Geert Uytterhoeven (2018-11-09 01:56:01)
> On Wed, Nov 7, 2018 at 7:37 PM Stephen Boyd <sboyd@...nel.org> wrote:
> > Quoting Rob Herring (2018-11-06 12:44:52)
> > > On Tue, Nov 6, 2018 at 12:36 PM Stephen Boyd <sboyd@...nel.org> wrote:
> > int (*probe)(struct platform_device *pdev);
> > };
> >
> > struct of_platform_driver_probe_func mtk_probes[] = {
> > mtk_probe1,
> > mtk_probe2,
> > mtk_probe3,
> > };
> >
> > struct platform_driver mtk_driver = {
> > .of_probes = &mtk_probes;
> > .driver = {
> > .name = "mtk-foo";
> > .of_match_table = mtk_match_table,
> > },
> > };
>
> This looks worse to me: people tend to be very good at keeping multiple
> arrays in sync :-(
To be _not_ very good? Agreed, and so specifying the probe function as
another member in struct of_device_id seems to be the way to go.
Powered by blists - more mailing lists