Message ID | 1be369f5a007c9f77bce7a33748ef428152894d7.1701906455.git.soyer@irl.hu |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp4453955vqy; Wed, 6 Dec 2023 16:00:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IGKLL8sQs/6sw7fJMSOs4QS0QvHlmAcuDJdsq1E1gO/tbCu0IWs09AKu1tt+4wKfnzjSA5t X-Received: by 2002:a05:6a21:a596:b0:18f:2d08:e945 with SMTP id gd22-20020a056a21a59600b0018f2d08e945mr2456418pzc.19.1701907212005; Wed, 06 Dec 2023 16:00:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701907211; cv=none; d=google.com; s=arc-20160816; b=jLhlGZTdy0WVu5q3eWeddQNMeMMAkDqibgmm4ch6Nw2ZeaGG95VQQl5dG4RIuyq3Ts I2U3xbweRrB7l8JXrgQvY2p9EMAB6mrxA3D654bGpOtkfFPjL1iaNbO3WOTMQJbkZN/6 DU31XY6QOb8x5KJmw+fsnSq4jGUgTVUStzkbgnLALEi7CABaMdSapsDtQzHzGf8ohIah 2A46hvk2hWvWEd3p4UMN4kyoyCPig74HSf/mitT6VPhHjB9Cf0kMsMnb/RcJOHWyHfg8 ocbgl7d+bP/5wQaKMRFAqFskm7WcVKMfkeM/JRM/Sn5mbTdblMV2cOehbQ51ZskTZtrT z0aQ== 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=skOqsMq2SHh5TWXiR0riNg05ppH1I0l2+xejiEawCy0=; fh=zySoyVfK/7ExaDz2MWyww8poQ40q3tZak5TTvfb/Ovc=; b=uOfKcw5CThuAp/eiHcxphzW5jxnB4PRyTMvkJVmxCHmgav7dVdZbDtlSfQkwtyALIN AFGZY2xc4Rf8KpdmSSqVpUWhyub44E3qQakGS576PmYWcfXGFyR/atR5B+FSW2o5RkHO nocaVmRoWQTPGQ4fuZIKO0cnl7SAgPQho7VW82pBZyFGL3uwnyvuyfoy0fO6RuK5l/RZ Ok955tnExwQXayshu+qE9mVZMMA1/rL+VYsFBft+7jLqfqoic7a/AbQvXnVQM4xKXNNB V+jbcA+1/PBMsePPp8Slt8lqtU2mI7EhF4rAo/PGCFxpE+3/Y9I1/XxqxlC8wrVIxzNu 2Pkg== 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 Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id s18-20020a17090aad9200b00286a1497c76si42723pjq.21.2023.12.06.16.00.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 16:00:11 -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 EDE52802A545; Wed, 6 Dec 2023 16:00:09 -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 S231218AbjLGAAA (ORCPT <rfc822;pusanteemu@gmail.com> + 99 others); Wed, 6 Dec 2023 19:00:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229707AbjLFX77 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 6 Dec 2023 18:59:59 -0500 Received: from irl.hu (irl.hu [95.85.9.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3648A19E for <linux-kernel@vger.kernel.org>; Wed, 6 Dec 2023 16:00:05 -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 00000000000716DF.0000000065710B02.00119017; Thu, 07 Dec 2023 01:00:02 +0100 From: Gergo Koteles <soyer@irl.hu> To: Shenghao Ding <shenghao-ding@ti.com>, Kevin Lu <kevin-lu@ti.com>, Baojun Xu <baojun.xu@ti.com>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org> Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Gergo Koteles <soyer@irl.hu> Subject: [PATCH 02/16] ALSA: hda/tas2781: leave hda_component in usable state Date: Thu, 7 Dec 2023 00:59:43 +0100 Message-ID: <1be369f5a007c9f77bce7a33748ef428152894d7.1701906455.git.soyer@irl.hu> X-Mailer: git-send-email 2.43.0 In-Reply-To: <cover.1701906455.git.soyer@irl.hu> References: <cover.1701906455.git.soyer@irl.hu> 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: <linux-kernel.vger.kernel.org> 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:00:10 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784579056934220371 X-GMAIL-MSGID: 1784579056934220371 |
Series |
ALSA: hda/tas2781: Add tas2563 support
|
|
Commit Message
Gergo Koteles
Dec. 6, 2023, 11:59 p.m. UTC
Unloading then loading the module causes a panic.
Set only previously modified fields to null.
Signed-off-by: Gergo Koteles <soyer@irl.hu>
---
sound/pci/hda/tas2781_hda_i2c.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c index fb802802939e..077a01521eef 100644 --- a/sound/pci/hda/tas2781_hda_i2c.c +++ b/sound/pci/hda/tas2781_hda_i2c.c @@ -613,8 +613,11 @@ static void tas2781_hda_unbind(struct device *dev, struct tasdevice_priv *tas_priv = dev_get_drvdata(dev); struct hda_component *comps = master_data; - if (comps[tas_priv->index].dev == dev) - memset(&comps[tas_priv->index], 0, sizeof(*comps)); + if (comps[tas_priv->index].dev == dev) { + comps[tas_priv->index].dev = NULL; + strscpy(comps->name, "", sizeof(comps->name)); + comps[tas_priv->index].playback_hook = NULL; + } tasdevice_config_info_remove(tas_priv); tasdevice_dsp_remove(tas_priv);