lkml.org 
[lkml]   [2020]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 2/3] mfd: bd9571mwv: Make the driver more generic
Date
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

\
 
 \ /
  Last update: 2020-12-10 09:32    [W:0.188 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site