i2c: acpi: Add an i2c_acpi_client_count() helper function
authorHans de Goede <hdegoede@redhat.com>
Tue, 3 Aug 2021 16:00:41 +0000 (18:00 +0200)
committerHans de Goede <hdegoede@redhat.com>
Thu, 12 Aug 2021 15:26:24 +0000 (17:26 +0200)
commit20a1b3acfc802ad7b6b327f2bdc0570711538561
treea94f8a0ceaee67e54cbb134f01fef1f79ec89d3f
parent382b91db8044669d254006df799df9d85d4ad891
i2c: acpi: Add an i2c_acpi_client_count() helper function

We have 3 files now which have the need to count the number of
I2cSerialBus resources in an ACPI-device's resource-list.

Currently all implement their own helper function for this,
add a generic helper function to replace the 3 implementations.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210803160044.158802-2-hdegoede@redhat.com
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/i2c-core-acpi.c
include/linux/i2c.h