Received: by 2002:ac0:de83:0:0:0:0:0 with SMTP id b3csp755653imk; Sun, 3 Jul 2022 08:06:38 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ujyIeR7f4SaGhK7QHLSiyJAUeyJLBx09lDMsIF6DPwECAEr77ZUCjQv+ViL5CTI1avbx2I X-Received: by 2002:a05:6a00:17a7:b0:525:4306:72ad with SMTP id s39-20020a056a0017a700b00525430672admr30906103pfg.42.1656860798312; Sun, 03 Jul 2022 08:06:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656860798; cv=none; d=google.com; s=arc-20160816; b=sp1MoRblYctFTGZmrEXn3LAEdL1kJ1lOczPtCHMTTxEIaOFtJ8haRRVk7RHmk+GYGw 2Dwau8MQJADrwGjbArevpBygH9upp4BetWTc+nddUx5ZZiVOdbOshxmxRFc0Z42n6d77 5S27TfBLVr7BLstmSGvHDhmbUXwsdnGUM/B4XqSEWPk7ojgy6HsYJjEkwjAhtfnywN2M OAeQ88NCa4JY939XXDFEVw0Jl9UIsshJepzeeMOz/gMZZELbSk64DjkOaEIkv1OBrowM UPYCfaQAfpdgBOjZujnZPxh6s0MA91xcI96wfckCCKOX5uJTWT/EKSr9y/mqUerM6KIW xC5Q== 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=P8CXCs4H+Wg19YVWs7QKcS4KWEYs2ecHBChZCmg+9tY=; b=oSu+ToIZsm3sEHWbqe3WLvnzubPR/WERFYPNxrBXe1cVNzjJOikqHxl0ggEXhvToux TnozpK1EuaY6Lwh3OhuYryv6gFDwVrOspOQp6TFI/0MFxW9l0hR0525TcxI6xnz0YdIJ bSJ0dYcFKyu0CZrHahx7NYM9PrT2XHDgj6lw2zPGaA8Mdd9NUjPgCRmqi+/dkBp3JgGC w7NyDnkMl20CtMh7yKDJbWUvaYua2e5J1LYmq+mZG2v0QqeyC89LYtxLC0zRSuDYO0Ar lx9mnIX8iG2ptj5An74Wa2H+QiHpssaW893x7hkR0StAKbuePTjQf4tq5ogbwRIgIH18 L0Bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fxyReEXd; 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 w22-20020a17090a15d600b001dc47313186si14257751pjd.68.2022.07.03.08.06.26; Sun, 03 Jul 2022 08:06:38 -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=fxyReEXd; 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 S232588AbiGCOvy (ORCPT + 99 others); Sun, 3 Jul 2022 10:51:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229739AbiGCOvv (ORCPT ); Sun, 3 Jul 2022 10:51:51 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FA0E263B for ; Sun, 3 Jul 2022 07:51:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656859911; x=1688395911; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=1Swa9EyBO2RNDfjUjVHJNEs947l9uCAsdG7L2gwvtBE=; b=fxyReEXdZYSqPcIu1Q1vriyraxbkdeEgGLiVxoGyvZiPbzOLiWsbvMEN u2ebxrncmuOyJQLHXK1k/YCGY8eFlLg8yOyKwtJ6HitcomH5xUE7dsC1S ofQc8Fdh/yiO4CWu+yZDeHSb7gs+tXoi0wZydmUrhoLMZBcwC984tFKil awH2x9P0sRRqa8yEl+KL5IPczv7cUyk5G7GeO/hId7okhy1P76nIViWwm xE/1wA2ej0mXTeZUA5WikoUHEUShluADXz8seEQZUtL/MI493868WQy3x +YMWQuYlh0Y11/nwvv+iiUY7w5ri/GScXPUV/us1pNYpeebdRcKSfzk1d Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10396"; a="284063995" X-IronPort-AV: E=Sophos;i="5.92,241,1650956400"; d="scan'208";a="284063995" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jul 2022 07:51:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,241,1650956400"; d="scan'208";a="838564919" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga006.fm.intel.com with ESMTP; 03 Jul 2022 07:51:47 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 066E311D; Sun, 3 Jul 2022 17:51:53 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH v2 1/1] ASoC: Intel: catpt: remove duplicating driver data retrieval Date: Sun, 3 Jul 2022 17:51:52 +0300 Message-Id: <20220703145152.62297-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=-5.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 --- v2: dropped device_get_match_data() and rewrote commit message sound/soc/intel/catpt/device.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sound/soc/intel/catpt/device.c b/sound/soc/intel/catpt/device.c index 85a34e37316d..2eeaeb962532 100644 --- a/sound/soc/intel/catpt/device.c +++ b/sound/soc/intel/catpt/device.c @@ -247,6 +247,7 @@ static int catpt_acpi_probe(struct platform_device *pdev) id = acpi_match_device(dev->driver->acpi_match_table, dev); if (!id) return -ENODEV; + spec = (const struct catpt_spec *)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_SST) { @@ -254,10 +255,6 @@ static int catpt_acpi_probe(struct platform_device *pdev) return -ENODEV; } - spec = device_get_match_data(dev); - if (!spec) - return -ENODEV; - cdev = devm_kzalloc(dev, sizeof(*cdev), GFP_KERNEL); if (!cdev) return -ENOMEM; -- 2.35.1