Hi Geert-san,

> From: Geert Uytterhoeven, Sent: Thursday, December 10, 2020 5:23 PM
<snip>
> > Or, keeping this member and then we check the product code by this member
> > instead of switch() like below?
> >
> > /* No build test, JFYI */
> > struct bd957x_data *data_array[] = {
> >         &bd9571mwv_data,
> >         &bd9574mwf_data,
> > };
> >
> > for (i = 0; I < ARRAY_SIZE(data_array); i++) {
> >         if (val == data_array[i].product_code_val) {
> >                 bd->data = data_array[i];
> >                 break;
> >         }
> > }
> 
> Given we probably won't have more than a handful variants, I'm
> leaning towards the switch() approach.

OK. I got it. I'll use switch().

Best regards,
Yoshihiro Shimoda

Reply via email to