Re: [PATCH] iio: dac: ti-dac5571: Use i2c_get_match_data()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 15, 2023 at 09:29:06AM +0200, Geert Uytterhoeven wrote:
> On Tue, Aug 15, 2023 at 9:19 AM Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> > On Sat, Aug 12, 2023 at 10:04:18AM +0100, Biju Das wrote:
> > > Replace device_get_match_data() and id lookup for retrieving match data
> > > by i2c_get_match_data() by converting enum->pointer for data in the
> > > match table.

...

> > > +     {.compatible = "ti,dac5571", .data = &dac5571_spec[single_8bit] },
> > > +     {.compatible = "ti,dac6571", .data = &dac5571_spec[single_10bit] },
> > > +     {.compatible = "ti,dac7571", .data = &dac5571_spec[single_12bit] },
> > > +     {.compatible = "ti,dac5574", .data = &dac5571_spec[quad_8bit] },
> > > +     {.compatible = "ti,dac6574", .data = &dac5571_spec[quad_10bit] },
> > > +     {.compatible = "ti,dac7574", .data = &dac5571_spec[quad_12bit] },
> > > +     {.compatible = "ti,dac5573", .data = &dac5571_spec[quad_8bit] },
> > > +     {.compatible = "ti,dac6573", .data = &dac5571_spec[quad_10bit] },
> > > +     {.compatible = "ti,dac7573", .data = &dac5571_spec[quad_12bit] },
> > > +     {.compatible = "ti,dac121c081", .data = &dac5571_spec[single_12bit] },
> >
> > I would reorder them a bit.
> 
> Which is safe in this particular case...
> But not in general, as there might be fall-back compatible values.

You mean the OF ID list must be specifically ordered?! What a nice minefield!
This has to be fixed somewhere else, surely.

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux