platform/x86: i2c-multi-instantiate: Count I2cSerialBus() resources
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 28 Nov 2018 11:45:30 +0000 (13:45 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 3 Dec 2018 19:40:02 +0000 (21:40 +0200)
commita729656697e306595f5349b9176cebea459d7519
tree59b67899da071eabb29850c10e85902fb18e8089
parent0d5102fe85302aa06a3e5fd8e63b09294aed4c48
platform/x86: i2c-multi-instantiate: Count I2cSerialBus() resources

Instead of relying on hard coded and thus expected number of I2C clients,
count the real amount provided by firmware.

This allows to support non-fixed amount of the slaves.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/i2c-multi-instantiate.c