Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1472373rdb; Mon, 2 Oct 2023 10:27:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFrhoccuQ31/5D8Rn50AQRIOBlPWW0xsJVOXezttNQ6LqnsC8rGAxJZBk9p+4+0kCrdOVwh X-Received: by 2002:a54:418c:0:b0:3ad:fd8e:384e with SMTP id 12-20020a54418c000000b003adfd8e384emr12018615oiy.7.1696267627115; Mon, 02 Oct 2023 10:27:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696267627; cv=none; d=google.com; s=arc-20160816; b=Jy8YHaXM8e4/QywUHiokQ02pHE7ax9wMG+jIv8zjskfC79hfJV4G7UmrY80/e7OFwC W2ZBYwGMffD1YBrZVKd0e6ny8YN2P8baFkQa53b1Pxsz9SUEwVPaE6qCmdKf3HytCr2W qIXYC6qZXI6lSUruEw7BTKIEKS+0xTEZG8McElkGLhEVCg/gp0K0T2klB8wlhjGuzXUf pRd5MTtx1zQ/oM7/QD27RKz4rJQriCQ9W7WYpat9wgN0tOLlLCCNk5Y78nxwS2F4ynYk /VjDMBcClHWhWtFD1i9YBCmptBO7/Tzk/FzH65SmdThAcCkHVLd9WZRXFmPoGD8o0DFg NqZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=txFsBHWFkHyK/fruiYxWj1cICMB0INwdO65Thb6KjSs=; fh=O8rcBeCQuCbCBajirICOG2VK0mw+RbsEN8gUlktEUZ0=; b=vPFqjnrp+MEIFUD0OvOdqag5hNj24xk20pxdmOU1HaETNo3uWuaV2lIgducG9NTbO1 VHyEzGQAszxFc047Ko8deM0o3YLzoMjCQfFbgZXcY1nFx2Bny5PPyPRKnU3I0RePQzpb oK48++Qp7iBWwBFY5wmKSzNy70KVgkJLs+U0Gy2IzxBaAnERd0REcgUBpajTckJrMf7b cp4kZOV6z5fA5YqrGF39dwg0+CwpJYb9WUog/sH41lImTMEg6cLnerGYZAgw2pNLFLcf CfVVYCWoQM/cIQ9fI1fQOO9KuJPr5s6DGP8vHQC+voHdcv0sqNFCbY7T3mOImw6sqW2q DZfw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id c4-20020a17090a674400b002791d2ce94asi7942252pjm.81.2023.10.02.10.27.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 10:27:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 5AAA880560CA; Mon, 2 Oct 2023 09:52:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238527AbjJBQwa (ORCPT + 99 others); Mon, 2 Oct 2023 12:52:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238493AbjJBQw2 (ORCPT ); Mon, 2 Oct 2023 12:52:28 -0400 Received: from mblankhorst.nl (lankhorst.se [IPv6:2a02:2308:0:7ec:e79c:4e97:b6c4:f0ae]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C6D5BF for ; Mon, 2 Oct 2023 09:52:25 -0700 (PDT) From: Maarten Lankhorst To: alsa-devel@alsa-project.org Cc: Maarten Lankhorst , Kai Vehmanen , Jaroslav Kysela , Takashi Iwai , Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Mark Brown , Daniel Baluta , linux-kernel@vger.kernel.org, sound-open-firmware@alsa-project.org Subject: [PATCH v5 12/12] ALSA: hda/i915: Remove extra argument from snd_hdac_i915_init Date: Mon, 2 Oct 2023 18:52:21 +0200 Message-Id: <20231002165221.17916-1-maarten.lankhorst@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230929145123.233838-1-maarten.lankhorst@linux.intel.com> References: <20230929145123.233838-1-maarten.lankhorst@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 02 Oct 2023 09:52:55 -0700 (PDT) Now that all drivers have moved from modprobe loading to handling -EPROBE_DEFER, we can remove the argument again. Signed-off-by: Maarten Lankhorst Reviewed-by: Kai Vehmanen --- Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Cezary Rojewski Cc: Pierre-Louis Bossart Cc: Liam Girdwood Cc: Peter Ujfalusi Cc: Bard Liao Cc: Ranjani Sridharan Cc: Kai Vehmanen Cc: Mark Brown Cc: Daniel Baluta Cc: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org Cc: sound-open-firmware@alsa-project.org include/sound/hda_i915.h | 4 ++-- sound/hda/hdac_i915.c | 14 +++----------- sound/pci/hda/hda_intel.c | 2 +- sound/soc/intel/avs/core.c | 2 +- sound/soc/intel/skylake/skl.c | 2 +- sound/soc/sof/intel/hda-codec.c | 2 +- 6 files changed, 9 insertions(+), 17 deletions(-) diff --git a/include/sound/hda_i915.h b/include/sound/hda_i915.h index f91bd66360865..6b79614a893b9 100644 --- a/include/sound/hda_i915.h +++ b/include/sound/hda_i915.h @@ -9,12 +9,12 @@ #ifdef CONFIG_SND_HDA_I915 void snd_hdac_i915_set_bclk(struct hdac_bus *bus); -int snd_hdac_i915_init(struct hdac_bus *bus, bool allow_modprobe); +int snd_hdac_i915_init(struct hdac_bus *bus); #else static inline void snd_hdac_i915_set_bclk(struct hdac_bus *bus) { } -static inline int snd_hdac_i915_init(struct hdac_bus *bus, bool allow_modprobe) +static inline int snd_hdac_i915_init(struct hdac_bus *bus) { return -ENODEV; } diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c index 0765e5350e7ba..365c36fdf2058 100644 --- a/sound/hda/hdac_i915.c +++ b/sound/hda/hdac_i915.c @@ -156,7 +156,7 @@ static int i915_gfx_present(struct pci_dev *hdac_pci) * * Returns zero for success or a negative error code. */ -int snd_hdac_i915_init(struct hdac_bus *bus, bool allow_modprobe) +int snd_hdac_i915_init(struct hdac_bus *bus) { struct drm_audio_component *acomp; int err; @@ -172,18 +172,10 @@ int snd_hdac_i915_init(struct hdac_bus *bus, bool allow_modprobe) acomp = bus->audio_component; if (!acomp) return -ENODEV; - if (allow_modprobe && !acomp->ops) { - if (!IS_ENABLED(CONFIG_MODULES) || - !request_module("i915")) { - /* 60s timeout */ - wait_for_completion_killable_timeout(&acomp->master_bind_complete, - msecs_to_jiffies(60 * 1000)); - } - } if (!acomp->ops) { - int err = allow_modprobe ? -ENODEV : -EPROBE_DEFER; snd_hdac_acomp_exit(bus); - return dev_err_probe(bus->dev, err, "couldn't bind with audio component\n"); + return dev_err_probe(bus->dev, -EPROBE_DEFER, + "couldn't bind with audio component\n"); } return 0; } diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 5cf7676114dc6..5255df16fbac5 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2138,7 +2138,7 @@ static int azx_probe(struct pci_dev *pci, #ifdef CONFIG_SND_HDA_I915 /* bind with i915 if needed */ if (chip->driver_caps & AZX_DCAPS_I915_COMPONENT) { - err = snd_hdac_i915_init(azx_bus(chip), false); + err = snd_hdac_i915_init(azx_bus(chip)); if (err < 0) { /* if the controller is bound only with HDMI/DP * (for HSW and BDW), we need to abort the probe; diff --git a/sound/soc/intel/avs/core.c b/sound/soc/intel/avs/core.c index 8a20639582487..33044f353575d 100644 --- a/sound/soc/intel/avs/core.c +++ b/sound/soc/intel/avs/core.c @@ -461,7 +461,7 @@ static int avs_pci_probe(struct pci_dev *pci, const struct pci_device_id *id) pci_set_drvdata(pci, bus); device_disable_async_suspend(dev); - ret = snd_hdac_i915_init(bus, false); + ret = snd_hdac_i915_init(bus); if (ret == -EPROBE_DEFER) goto err_i915_init; else if (ret < 0) diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c index 24bdbe2a53bec..f46f109d5856e 100644 --- a/sound/soc/intel/skylake/skl.c +++ b/sound/soc/intel/skylake/skl.c @@ -1056,7 +1056,7 @@ static int skl_probe(struct pci_dev *pci, } if (IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI)) { - err = snd_hdac_i915_init(bus, false); + err = snd_hdac_i915_init(bus); if (err < 0) goto out_dmic_unregister; } diff --git a/sound/soc/sof/intel/hda-codec.c b/sound/soc/sof/intel/hda-codec.c index f1fd5b44aaac9..8a5e99a898ecb 100644 --- a/sound/soc/sof/intel/hda-codec.c +++ b/sound/soc/sof/intel/hda-codec.c @@ -415,7 +415,7 @@ int hda_codec_i915_init(struct snd_sof_dev *sdev) return 0; /* i915 exposes a HDA codec for HDMI audio */ - ret = snd_hdac_i915_init(bus, true); + ret = snd_hdac_i915_init(bus); if (ret < 0) return ret; -- 2.39.2