Received: by 2002:ac0:de83:0:0:0:0:0 with SMTP id b3csp744985imk; Sun, 3 Jul 2022 07:52:56 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vlkkCQztZIzfTvx+ETR/3F2+/VLXB+7qpKgkH6SCyPSC/6zqJhlzsVfSA+oemiZgptBJ5b X-Received: by 2002:aa7:d685:0:b0:435:7910:f110 with SMTP id d5-20020aa7d685000000b004357910f110mr31738688edr.247.1656859976209; Sun, 03 Jul 2022 07:52:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656859976; cv=none; d=google.com; s=arc-20160816; b=quzcxV5mlW6sR/XXGS/LQP8FHN+ZFnhqA1dSdQ3DNJGjRJLe39+fbSv4xXlWwmEvmK b62J0tgGOTh8WX9CcYIHMZfMJz4FVicHJGCyT/d7Ulp61W6uALwgoXaWwxRUx8BUX2qu 25nOVYqpz8u0x/HXAsz+ZCdTB8fNucFkYvlpo/LjRgGZ50Rrx2acgAWWBzyPwCU4tePa NSpubwie/FhY9sWAjZQlsLaUfO/onl/VZhkWJZrLH97J4UFPqZJAbgsVEuFdaLop3RMn 4uD4yYMEhM0ypO7uGE1jPVGiFWHn3pGbNlAEOvdW3KOjAv7IVokaW7i2FNo9mHZD9qnV cBYQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=zwkVhkf8aUixocydfOZMUPtv6uDeQyH8TgyXgV3wrXM=; b=ahwZftjIRajqPChLQue2LzZB3MkCPr3J+1Q+G1rqt6uEA27tSxQhgEYIaWeZerXsk7 piy+56OQ6TeF2eZpO8dMUO1iSRP5H/CrYjwqIULIczvoJQV9zsngKAi6lO+IpI6jZZKv VhM0CvNOYluJgJujYBJiAObCNZj9JMF848x+tbDihZnmvIyxetsMkMJEUwTi0y4kVn/K 1pTNlvHZXhu+5nGlFa4G691kaoOkN7CtkpQ9gDhroyEvQkrm2nytMLFK50DGt8EjC1bd 4YIR8egTY6xtkMuFBiuksG6bJdueMxxeCQUFQR7zKWQ2v9nWp4UMyVjR8DkiJvXp8dP6 HGFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Wlr7NQBc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gz1-20020a170906f2c100b0070397358bcbsi4907482ejb.33.2022.07.03.07.52.21; Sun, 03 Jul 2022 07:52:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Wlr7NQBc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232297AbiGCOfe (ORCPT + 99 others); Sun, 3 Jul 2022 10:35:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231561AbiGCOfd (ORCPT ); Sun, 3 Jul 2022 10:35:33 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6A5963AB for ; Sun, 3 Jul 2022 07:35:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656858932; x=1688394932; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=nkpPchW34EvDdWNFL8m8ydINV2xi5ujMpaIGIa4Vt2w=; b=Wlr7NQBcMtm8kWSxLh25XDWK1vt2LAVhPKmZ5vTiPFB4RoaQVsEqo8Fq 1kmQSSq7s9dbg5lG7eFfIkstY9cAJ8/Eb8E3akinIS27ki3MNrrUk7RQI IEEcFwyOxdD5lrUbjiua+SoluToo5g+lt/ftDXC5qA87hml2FIlrpv5Nr T+6GCVUu5Slxx7xiFwB0fdBAtM+Wy/eWc89NqSUzWJHWsdRjg8ulQydAC n2LygdIGVNqZtA47d1SyQ798iVcyvYLgfjPdTYXsWLjxTp398bibVwPy/ hRVBfwwDkZ8+QNcF64zKCH6H1+OyUVboeVJJrgw0bndModg5Z/c+mWuQH A==; X-IronPort-AV: E=McAfee;i="6400,9594,10396"; a="280509565" X-IronPort-AV: E=Sophos;i="5.92,241,1650956400"; d="scan'208";a="280509565" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jul 2022 07:35:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,241,1650956400"; d="scan'208";a="659928882" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga004.fm.intel.com with ESMTP; 03 Jul 2022 07:35:29 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id D4C4E11D; Sun, 3 Jul 2022 17:35:35 +0300 (EEST) From: Andy Shevchenko To: Mark Brown , Pierre-Louis Bossart , Peter Ujfalusi , sound-open-firmware@alsa-project.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: Liam Girdwood , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Daniel Baluta , Jaroslav Kysela , Takashi Iwai , Andy Shevchenko Subject: [PATCH v1 1/1] ASoC: SOF: Intel: bdw: remove duplicating driver data retrieval Date: Sun, 3 Jul 2022 17:35:33 +0300 Message-Id: <20220703143533.62173-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org device_get_match_data() in ACPI case calls similar to acpi_match_device(). Hence there is no need to duplicate the call. Just assign what is in the id->driver_data. Signed-off-by: Andy Shevchenko --- sound/soc/sof/intel/bdw.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sound/soc/sof/intel/bdw.c b/sound/soc/sof/intel/bdw.c index 26df780c702e..346813aa3768 100644 --- a/sound/soc/sof/intel/bdw.c +++ b/sound/soc/sof/intel/bdw.c @@ -674,6 +674,7 @@ static int sof_broadwell_probe(struct platform_device *pdev) id = acpi_match_device(dev->driver->acpi_match_table, dev); if (!id) return -ENODEV; + desc = (const struct sof_dev_desc *)id->driver_data; ret = snd_intel_acpi_dsp_driver_probe(dev, id->id); if (ret != SND_INTEL_DSP_DRIVER_ANY && ret != SND_INTEL_DSP_DRIVER_SOF) { @@ -681,11 +682,7 @@ static int sof_broadwell_probe(struct platform_device *pdev) return -ENODEV; } - desc = device_get_match_data(dev); - if (!desc) - return -ENODEV; - - return sof_acpi_probe(pdev, device_get_match_data(dev)); + return sof_acpi_probe(pdev, desc); } /* acpi_driver definition */ -- 2.35.1