Re: [PATCH v3] mfd: ntxec: Support for EC in Tolino Shine 2 HD

From: Andreas Kemnade
Date: Mon Mar 15 2021 - 08:29:33 EST


On Mon, 15 Mar 2021 08:12:31 +0000
Lee Jones <lee.jones@xxxxxxxxxx> wrote:

[...]
> > static int ntxec_probe(struct i2c_client *client)
> > {
> > struct ntxec *ec;
> > unsigned int version;
> > int res;
> > + const struct mfd_cell *subdevs = ntxec_subdev;
> > + size_t n_subdevs = ARRAY_SIZE(ntxec_subdev);
>
> This is a little confusing. I had to re-read to figure it out.
>
> In my mind, it would be clearer to explicitly set these in the
> switch, rather than have a default which can be over-written.
>
yes, it is clearer. I was just afraid that your compiler cannot
figure it out that things get initialized and getting comments like
"This code has never seen a compiler."
But I will throw it against several ones.

Regards,
Andreas