Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1424594imw; Tue, 5 Jul 2022 09:12:26 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v7UkSocdWccDjm9llQmUxaUvlFg7ZcIo2m8VURKak+6WmOhCmZWPE0YqvddBLdZZv4Uo3K X-Received: by 2002:a05:6402:1e88:b0:435:bf05:f0f with SMTP id f8-20020a0564021e8800b00435bf050f0fmr47705256edf.2.1657037546600; Tue, 05 Jul 2022 09:12:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657037546; cv=none; d=google.com; s=arc-20160816; b=EQhnWdl/JDr3RRE0fqR1cCd4FeCboQxjmIdMHrTH0zXFsa7HCyh0qRO1T82TW60c9v zahd0wBldt0Oiv3CvrYk0f+zy5Vgl+5rg08X5sjpmLqGolF8O8AiD709lbStGXdrSUox Uqs+sr4xNzJyILjI+s9MgdUJiPyk4WYbg+gOe2/IineVDd/BYc80D16ydTxGlpZ7ihDx 6bRyrAiQRZcIUImogqee6QzMyYGKwHYYSF4+Ql/2fiaszFDDiEdnJwHH6hj5z01QRE20 0bFnWOtttCmDtySp+xM2hw7XHXktJm5GYZGVlGcNKuaBdqhA6KHltb35xJNlqtvvpXgU 3V+A== 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=stmTNrm7QT9TIt8ZxhipcUCpEAEX/ZEV39FqsvBKjts=; b=X+ELVGT+3vaElmhgFCcajanmNThsLxfi3Ds4w6Hsf+PErPksRwrE9hS8W+ja6Wlo/C MmIMExAnrDj1BmUql82F6Lbd/DH0X2RfP//YocbUyLhsO6gKNNWLOriUaEgzXO/POKlN G/sgF90jalotdCMIjFRIAs0W1VK/EW2VPL6FU4m6NCdHtpv1lA5Sy2QAunuHJW+V7l37 FBWvir7Nck0lW8ELGp1gXhomp0dbhEtuiXdlKFylyO5pklqgpQHWUizM5ZeK2IcHiAGz AyVfsoa8rBQLZRleXKC+RCyRkRGLy642mxum3VZehDq0pks4nHyzdfaJG17WpbQrSAJI KJPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fk8DD8g2; 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 bh10-20020a170906a0ca00b00722d5cab3adsi8693724ejb.291.2022.07.05.09.12.01; Tue, 05 Jul 2022 09:12:26 -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=fk8DD8g2; 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 S232562AbiGEP6O (ORCPT + 99 others); Tue, 5 Jul 2022 11:58:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230493AbiGEP6N (ORCPT ); Tue, 5 Jul 2022 11:58:13 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A96C266A for ; Tue, 5 Jul 2022 08:58:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657036692; x=1688572692; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=4UcFBdwVPNGp4VMF2eOGRnKawTrULmg2jhiKGa5OAmM=; b=fk8DD8g2x5zhV7Kd4eO0Tb4auvEtbc+O+jIrFtPlT2WNTuFQz19Xn1DF 7aNWrSnW4cOYDpUq+/vpqfxN7zguCVE3mU80badcg3adeZJwIONlQXWnE TD6p1dir5rjVM7qYx8kZUASNvYfVA0yrDtxgTwj4qvFvWiPrXYqz6z3u9 eRNOnkOPGM+9w0UtY+TZW4YKJQLNFWgq1unyhxV9f8+IcNlZn3LDUtZNM DhHgw7EAok4ueC20rWUoQ6/wdlKfl0jFQJY5/j9nP0lOhGkIJe/OdGQwv mz7Fv/y7QyflKRAbKICy8qa3273ww2NapWOdmz/Wiz3xaXig+YIlddGCc g==; X-IronPort-AV: E=McAfee;i="6400,9594,10399"; a="283416794" X-IronPort-AV: E=Sophos;i="5.92,247,1650956400"; d="scan'208";a="283416794" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2022 08:58:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,247,1650956400"; d="scan'208";a="919769341" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga005.fm.intel.com with ESMTP; 05 Jul 2022 08:58:09 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id F069E1A0; Tue, 5 Jul 2022 18:58:15 +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 v3 1/1] ASoC: Intel: catpt: remove duplicating driver data retrieval Date: Tue, 5 Jul 2022 18:58:13 +0300 Message-Id: <20220705155813.75917-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 --- v3: moved spec assignment closer to its user (Péter, Czarek) 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..d48a71d2cf1e 100644 --- a/sound/soc/intel/catpt/device.c +++ b/sound/soc/intel/catpt/device.c @@ -254,14 +254,11 @@ 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; + spec = (const struct catpt_spec *)id->driver_data; catpt_dev_init(cdev, dev, spec); /* map DSP bar address */ -- 2.35.1