mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Naresh Solanki <naresh.solanki@9elements.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] regulator: max597x: Align for simple_mfd_i2c driver
Date: Wed, 15 Feb 2023 14:01:27 +0000	[thread overview]
Message-ID: <Y+zlt6tJajvtZ4uV@sirena.org.uk> (raw)
In-Reply-To: <20230214101321.1902855-1-Naresh.Solanki@9elements.com>

[-- Attachment #1: Type: text/plain, Size: 410 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2023-02-15 14:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-14 10:13 Naresh Solanki
2023-02-15 14:01 ` Mark Brown [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y+zlt6tJajvtZ4uV@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=naresh.solanki@9elements.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®