public inbox for linux-sound@vger.kernel.org
 help / color / mirror / Atom feed
From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: <tiwai@suse.com>, <broonie@kernel.org>,
	<wsa+renesas@sang-engineering.com>,
	<mika.westerberg@linux.intel.com>
Cc: <linux-sound@vger.kernel.org>, <linux-spi@vger.kernel.org>,
	<linux-i2c@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<patches@opensource.cirrus.com>,
	Richard Fitzgerald <rf@opensource.cirrus.com>
Subject: [PATCH v2 2/3] i2c: Fix conditional for substituting empty ACPI functions
Date: Fri, 2 Aug 2024 16:22:14 +0100	[thread overview]
Message-ID: <20240802152215.20831-3-rf@opensource.cirrus.com> (raw)
In-Reply-To: <20240802152215.20831-1-rf@opensource.cirrus.com>

Add IS_ENABLED(CONFIG_I2C) to the conditional around a bunch of ACPI
functions.

The conditional around these functions depended only on CONFIG_ACPI.
But the functions are implemented in I2C core, so are only present if
CONFIG_I2C is enabled.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
Changes since V1:
- This patch is new in V2.

 include/linux/i2c.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 07e33bbc9256..7eedd0c662da 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -1066,7 +1066,7 @@ static inline int of_i2c_get_board_info(struct device *dev,
 struct acpi_resource;
 struct acpi_resource_i2c_serialbus;
 
-#if IS_ENABLED(CONFIG_ACPI)
+#if IS_ENABLED(CONFIG_ACPI) && IS_ENABLED(CONFIG_I2C)
 bool i2c_acpi_get_i2c_resource(struct acpi_resource *ares,
 			       struct acpi_resource_i2c_serialbus **i2c);
 int i2c_acpi_client_count(struct acpi_device *adev);
-- 
2.39.2


  parent reply	other threads:[~2024-08-02 15:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-02 15:22 [PATCH v2 0/3] ALSA: Add support for new HP G12 laptops Richard Fitzgerald
2024-08-02 15:22 ` [PATCH v2 1/3] spi: Add empty versions of ACPI functions Richard Fitzgerald
2024-08-02 15:22 ` Richard Fitzgerald [this message]
2024-08-04 14:34   ` [PATCH v2 2/3] i2c: Fix conditional for substituting empty " Wolfram Sang
2024-08-02 15:22 ` [PATCH v2 3/3] ALSA: hda/realtek: Add support for new HP G12 laptops Richard Fitzgerald
2024-08-02 21:49 ` (subset) [PATCH v2 0/3] ALSA: " Mark Brown
2024-08-05  8:02 ` Takashi Iwai
2024-08-06 11:06   ` Richard Fitzgerald
2024-08-06 11:19     ` Takashi Iwai
2024-08-06 11:29       ` Wolfram Sang
2024-08-06 11:41         ` Takashi Iwai
2024-08-12  6:53           ` Wolfram Sang
2024-08-12  7:04             ` Takashi Iwai
2024-08-05 19:40 ` Mark Brown
2024-08-12  7:19   ` Takashi Iwai
2024-08-12  7:20 ` Takashi Iwai

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=20240802152215.20831-3-rf@opensource.cirrus.com \
    --to=rf@opensource.cirrus.com \
    --cc=broonie@kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=patches@opensource.cirrus.com \
    --cc=tiwai@suse.com \
    --cc=wsa+renesas@sang-engineering.com \
    /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