Hi
On 06/18/2017 02:07 PM, Mika Westerberg wrote:
On Thu, Jun 15, 2017 at 03:40:49PM +0300, Jarkko Nikula wrote:
-static void acpi_default_enumeration(struct acpi_device *device)
+static bool acpi_is_spi_i2c_slave(struct acpi_device *device)
{
struct list_head resource_list;
bool is_spi_i2c_slave = false;
- /*
- * Do not enumerate SPI/I2C slaves as they will be enumerated by their
- * respective parents.
- */
INIT_LIST_HEAD(&resource_list);
acpi_dev_get_resources(device, &resource_list, acpi_check_spi_i2c_slave,
&is_spi_i2c_slave);
acpi_dev_free_resource_list(&resource_list);
- if (!is_spi_i2c_slave) {
+
+ return is_spi_i2c_slave;
+}
I wonder if it would be better idea flag the acpi_device and then check
that flag in acpi_default_enumeration()? Now you need to pass
spi_i2c_slave from many call sites which looks quite overkill.
Sounds a good idea. At quick look we probably can have such flag in
struct acpi_device_flags since there are already bunch of reserved bits
and no need to enlarge struct acpi_device.
--
Jarkko
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html