[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y+zlt6tJajvtZ4uV@sirena.org.uk>
Date: Wed, 15 Feb 2023 14:01:27 +0000
From: Mark Brown <broonie@...nel.org>
To: Naresh Solanki <naresh.solanki@...ements.com>
Cc: Liam Girdwood <lgirdwood@...il.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] regulator: max597x: Align for simple_mfd_i2c driver
On Tue, Feb 14, 2023 at 11:13:20AM +0100, Naresh Solanki wrote:
> + if (of_device_is_compatible(i2c->dev.of_node, "maxim,max5978"))
> + max597x->num_switches = MAX597x_TYPE_MAX5978;
> + else
> + max597x->num_switches = MAX597x_TYPE_MAX5970;
It looks like this will break if there's any more variants, it
looks like it should be checking each compatible in turn and
erroring out if nothing matches somehow.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists