lkml.org 
[lkml]   [2023]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-03-27 00:24    [W:0.055 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site