From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Cc: linux-acpi@vger.kernel.org, "Rafael J . Wysocki" <rjw@rjwysocki.net>
Subject: Re: [PATCH] ACPI / scan: Fix enumeration for special SPI and I2C devices
Date: Sun, 18 Jun 2017 14:07:04 +0300 [thread overview]
Message-ID: <20170618110704.GR629@lahna.fi.intel.com> (raw)
In-Reply-To: <20170615124049.19787-1-jarkko.nikula@linux.intel.com>
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.
next prev parent reply other threads:[~2017-06-18 11:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-15 12:40 [PATCH] ACPI / scan: Fix enumeration for special SPI and I2C devices Jarkko Nikula
2017-06-18 11:07 ` Mika Westerberg [this message]
2017-06-19 10:14 ` Jarkko Nikula
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170618110704.GR629@lahna.fi.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=jarkko.nikula@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).