diff options
author | Guenter Roeck <linux@roeck-us.net> | 2024-06-06 09:36:38 -0700 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2024-06-11 07:25:13 -0700 |
commit | e229c6e80f9d3e92880de66962f7448d7d00e7df (patch) | |
tree | d89e7e6734eb4e2f8fa8a2fd3d866c76902349d2 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 138d45d96758db803b50761297f3331c9170bc87 (diff) |
hwmon: (pmbus/mp2856) Let enum chips start with index 0
Earlier it was assumed that the data pointer in of_device_id must not start
with 0 (NULL) if i2c_get_match_data() is used. However, it turns out that
this is perfectly fine as long as there is also an i2c_device_id array with
the same data, which is used as fallback in that case.
Let enum chips start with 0 to avoid confusion against other drivers
where the enum starts with 0 and i2c_get_match_data() is used as well.
While doing that, remove chip_id from struct mp2856_data since it is only
used in the probe function, and typecast the result of i2c_get_match_data()
to kernel_ulong_t to avoid the double typecast.
Cc: Peter Yin <peteryin.openbmc@gmail.com>
Cc: Potin Lai <potin.lai.pt@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions