[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <TY2PR01MB3692DE297F43405DC0CFDE59D8CB0@TY2PR01MB3692.jpnprd01.prod.outlook.com>
Date: Thu, 10 Dec 2020 08:29:14 +0000
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
CC: Marek Vasut <marek.vasut+renesas@...il.com>,
Lee Jones <lee.jones@...aro.org>,
Khiem Nguyen <khiem.nguyen.xt@...esas.com>,
Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 2/3] mfd: bd9571mwv: Make the driver more generic
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
Powered by blists - more mailing lists