Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1332012rdb; Wed, 6 Dec 2023 16:05:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IGN1WuBuvtP/bKclVCfx+0LR42EYFt0/njIKdlqZbCcyDMCbqULPFVulL7yAvRvxPItRfUh X-Received: by 2002:a05:6358:913:b0:170:578e:b033 with SMTP id r19-20020a056358091300b00170578eb033mr1236901rwi.52.1701907529373; Wed, 06 Dec 2023 16:05:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701907529; cv=none; d=google.com; s=arc-20160816; b=tcRIzcCWvFzlzR3zp8qh7lPwPG4CGOx9YThr0AU6g9h8zivmo62BVw8iFQPTs3SM0W mo4S3XqWgwn7F+AfK2ZCOXQJuURxYy0gBaccDUz3aMdc8q7ZtraisUYW7C3YYUSJNjBg a6/yNhA7EDJsmHQBc56IA5ANNGshzhZLMKKEYIJYARnxpc7BlCBE4Mx3yKkCx+gx2hsE tDQoMvQAxYZCGoFAIq9NxCJvFWhw8oyEoJaHcWhSEQUfy9Z8+1z+W9J366Gk0yf+/kAN rBgrePxiuBDZpSmCW9E0h0Y11mPv5wloOkmNPGEGNRYjOg3A1eFNn/UE/jbOSqxC0e8k o7wg== 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=TbAbpG+E4UQZ9CngfQG9NoY1x9f9T3MUn7cI9KFbUsI=; fh=zySoyVfK/7ExaDz2MWyww8poQ40q3tZak5TTvfb/Ovc=; b=Fhnc7l2OpXwx8Zw49UUoOMtW9YIGCwJllHHAjRT85Efy02jawkk70/EOebr+nVA3pJ Mje2oFn1bG6s1QT5E3uR4SsG0OYQ0BVIosHAzaQZGg6I5S4SpfyiHAzqDRf/ABUQY59p hZ18ZWYgRJVQVKGfMEtZN6w40vWojFZz5OkO8Vkh7JQ6FkjVnbJOXDtBpd/YWms83MY5 WG7U+mS2yJrvTVZMKoQJ8VYzbUWGTg6w4LRpp8EXRM/B/vaakdh2N53ModXSFi1uRyz4 Xl//JLIKmH2z1qGKlnWomxGJXNDXqg/33aEeenDr5w2ocwmQnqItdMBfLTuO80tifhR7 aWkA== 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:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id h64-20020a638343000000b005c1f51c706bsi100101pge.599.2023.12.06.16.05.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 16:05:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 5462E802402D; Wed, 6 Dec 2023 16:05:14 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1441818AbjLGAFB (ORCPT + 99 others); Wed, 6 Dec 2023 19:05:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232657AbjLGAEm (ORCPT ); Wed, 6 Dec 2023 19:04:42 -0500 Received: from irl.hu (irl.hu [95.85.9.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F30E10C2 for ; Wed, 6 Dec 2023 16:04:39 -0800 (PST) Received: from fedori.lan (51b690cd.dsl.pool.telekom.hu [::ffff:81.182.144.205]) (AUTH: CRAM-MD5 soyer@irl.hu, ) by irl.hu with ESMTPSA id 00000000000716FB.0000000065710C15.001190CD; Thu, 07 Dec 2023 01:04:37 +0100 From: Gergo Koteles To: Shenghao Ding , Kevin Lu , Baojun Xu , Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Gergo Koteles Subject: [PATCH 12/16] ASoC: tas2781: move set_drv_data outside tasdevice_init Date: Thu, 7 Dec 2023 01:04:28 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Mime-Autoconverted: from 8bit to 7bit by courier 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 06 Dec 2023 16:05:14 -0800 (PST) allow driver specific driver data in tas2781-hda-ic2c and tas2781-i2c Signed-off-by: Gergo Koteles --- sound/pci/hda/tas2781_hda_i2c.c | 2 ++ sound/soc/codecs/tas2781-comlib.c | 2 -- sound/soc/codecs/tas2781-i2c.c | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c index f28383597ca8..290c41194139 100644 --- a/sound/pci/hda/tas2781_hda_i2c.c +++ b/sound/pci/hda/tas2781_hda_i2c.c @@ -734,6 +734,8 @@ static int tas2781_hda_i2c_probe(struct i2c_client *clt) if (!tas_priv) return -ENOMEM; + dev_set_drvdata(&clt->dev, tas_priv); + if (strstr(dev_name(&clt->dev), "TIAS2781")) { device_name = "TIAS2781"; tas_priv->load_calibration = load_calibration_efi_1; diff --git a/sound/soc/codecs/tas2781-comlib.c b/sound/soc/codecs/tas2781-comlib.c index 635f97db033b..0c04735dd575 100644 --- a/sound/soc/codecs/tas2781-comlib.c +++ b/sound/soc/codecs/tas2781-comlib.c @@ -316,8 +316,6 @@ int tasdevice_init(struct tasdevice_priv *tas_priv) tas_priv->tasdevice[i].cur_conf = -1; } - dev_set_drvdata(tas_priv->dev, tas_priv); - mutex_init(&tas_priv->codec_lock); out: diff --git a/sound/soc/codecs/tas2781-i2c.c b/sound/soc/codecs/tas2781-i2c.c index 55cd5e3c23a5..917b1c15f71d 100644 --- a/sound/soc/codecs/tas2781-i2c.c +++ b/sound/soc/codecs/tas2781-i2c.c @@ -689,6 +689,8 @@ static int tasdevice_i2c_probe(struct i2c_client *i2c) if (!tas_priv) return -ENOMEM; + dev_set_drvdata(&i2c->dev, tas_priv); + if (ACPI_HANDLE(&i2c->dev)) { acpi_id = acpi_match_device(i2c->dev.driver->acpi_match_table, &i2c->dev); -- 2.43.0