summaryrefslogtreecommitdiff
path: root/scripts/lib/kdoc/kdoc_files.py
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2024-08-02 02:43:03 +0300
committerGuenter Roeck <linux@roeck-us.net>2024-08-30 18:34:23 +0300
commit2bb476524c61f43e6e89aeacaee6599ce5dd3505 (patch)
treeac7191885694a67e7738089b096bffbe1ed8e283 /scripts/lib/kdoc/kdoc_files.py
parent232177a37b90d76d3616f28fb47636d81c02fe8b (diff)
downloadlinux-2bb476524c61f43e6e89aeacaee6599ce5dd3505.tar.xz
hwmon: (ina2xx) Mark regmap_config as const
Recent versions of checkpatch complain that struct regmap_config should be declared as const. WARNING: struct regmap_config should normally be const Doing so reveals a potential problem in the driver: If both supported chips are present in a single system, the maximum number of registers may race when devices are instantiated since max_registers is updated in the probe function. Solve the problem by setting .max_registers to the maximum register address of all supported chips. This does not make a practical difference while fixing the potential race condition and reducing code complexity. Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions