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

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

 



Hi Andy,

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.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux