diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2024-06-06 23:54:14 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-06-13 22:22:49 +0300 |
commit | 58e04f315295ea3637a119686bb2e3ee6cef1f04 (patch) | |
tree | 29abe3a9938766a1b75256daa62382b885183c6e /drivers/acpi/pmic/intel_pmic_chtdc_ti.c | |
parent | 83a7eefedc9b56fe7bfeff13b6c7356688ffa670 (diff) | |
download | linux-58e04f315295ea3637a119686bb2e3ee6cef1f04.tar.xz |
ACPI: PMIC: Use sizeof() instead of hard coded value
It's better to use sizeof() of a given buffer than spreading
a hard coded value.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/pmic/intel_pmic_chtdc_ti.c')
-rw-r--r-- | drivers/acpi/pmic/intel_pmic_chtdc_ti.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/pmic/intel_pmic_chtdc_ti.c b/drivers/acpi/pmic/intel_pmic_chtdc_ti.c index c84ef3d15181..35744a0307aa 100644 --- a/drivers/acpi/pmic/intel_pmic_chtdc_ti.c +++ b/drivers/acpi/pmic/intel_pmic_chtdc_ti.c @@ -87,7 +87,7 @@ static int chtdc_ti_pmic_get_raw_temp(struct regmap *regmap, int reg) { u8 buf[2]; - if (regmap_bulk_read(regmap, reg, buf, 2)) + if (regmap_bulk_read(regmap, reg, buf, sizeof(buf))) return -EIO; /* stored in big-endian */ |