From patchwork Tue Feb 6 20:25:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gergo Koteles X-Patchwork-Id: 197638 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1803324dyb; Tue, 6 Feb 2024 12:26:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IGryY9sFck6Muq3i1FNIDluxJcJdJghcvDWTa4Aa5/eieiHFyFRLsl4bwEjWhYsdYPpu2aC X-Received: by 2002:a17:903:1c4:b0:1d9:14fb:d142 with SMTP id e4-20020a17090301c400b001d914fbd142mr3125189plh.32.1707251195854; Tue, 06 Feb 2024 12:26:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707251195; cv=pass; d=google.com; s=arc-20160816; b=npIK9eyx3MTlB+hywbvRaoWL88JDvt/t8FKR8Ss02uJa6Xu3Xct6d3IHn8y6YbuiQg 9RGp5uxTC/aIlCeUn4uD+xUNbWfEHS6/e+XPJM8XYrLinnQ2Im6YMZl+vpUni6GTHUOq wX01Flm2NasmSqe8/hQGoseazrlmeuw49+kJd+WJeCnlwpvXk+4JLUN9GiER0SiWfCQB iZ1etH486SpiAyKGCWfizasWeVg8UjnyiN21Qv7m196X87WjG4COyCIUvxMarrQDEzh/ /vGemw6uyySx+wnHDDR+gBUbecmBSdqhsudKa4bxpkyGsyWW4DLCGfUPz13sOk80g9VQ m++Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=eeUaiZyf4kyFyfG966WHArv8l6xoDVQDtNUSta0zUIo=; fh=VcK8ew1lvD4uSQJ20d1+blaqQ2iCy2g88+VRy3Pc9Wo=; b=r5iTKMOPaTN/c9P1FOHf1FDZJxyQ+y8OdfokW/B1ydB53y9phPL7Z4YF/l3VfniW2u BvKDO57aR2RLJp2LmRhhh5v0tzD7KFgaIAzpfXOO+eoHroIQSzC2g7MA9XzA06zhp06L Vg246IsVGZgVyEZ0C+oS5FrmOXMlK2EJgf6zk1fbGDlyWSkIWmwznvbqPSB+P6DbdST5 9AALsPlhdcUQkGs7xQoX4Xt0G85q04jyysscn1kxb8//66YxTQnvnLoxCn2PDWymcq7s 7DPIsORe5azQezlJi+rL4ehXME7tWf6TzSucaSlEfLX7brbOrR4donB/EfPwIX6AiH1W bCqQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=irl.hu dmarc=pass fromdomain=irl.hu); spf=pass (google.com: domain of linux-kernel+bounces-55596-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55596-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu X-Forwarded-Encrypted: i=1; AJvYcCUhvJDjWHrMCUJLtC5YGAyRz1IO5PlPswYXrEZ4TznwxhOU5/Xj4bIKAIK2sTsCS7FgBfk3lL5fgnwD/Wxe0hh3hif4pg== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id jd13-20020a170903260d00b001d73a2acc14si2074888plb.558.2024.02.06.12.26.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 12:26:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55596-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=irl.hu dmarc=pass fromdomain=irl.hu); spf=pass (google.com: domain of linux-kernel+bounces-55596-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55596-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8B1F0282914 for ; Tue, 6 Feb 2024 20:26:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9354F1A587; Tue, 6 Feb 2024 20:26:13 +0000 (UTC) Received: from irl.hu (irl.hu [95.85.9.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D5C2D18EA8; Tue, 6 Feb 2024 20:26:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.85.9.111 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707251172; cv=none; b=nS/xI0JAkYsegd7F7exe/ycrFOL2DuJxoIWI78HQg9JexAAfgTJAYuqtQS5lQiJ90M2ss9Rf8FgqWkfGsAMnPx2sAHvd99wzNwniYR6gQlqCdHRm8zG0nHoTe02Z2oYFlnqrvlLVS0WRzenV5ZhsIge9VcYJsZn8n2kA3sQDiQo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707251172; c=relaxed/simple; bh=GCZTOpyn0Zr/27ByvG88St2jXBibIhL8nI1Rez9DQwA=; h=From:To:Cc:Subject:Date:Message-ID:Mime-Version:Content-Type; b=plN5cEaaUmnV9bimE8iSiRjbAXADw8QP9IQNlUDzmKZKfK6TpZXT0zEnpJsM3ONJ8SKnJtQcT1gxvoXC7XpefgHzFb5BXS72krCZ+StJcRGr/0PdbNSDHtx5TzZbnR0RWhf8Lg8/555+P0HWXa0iZDaYOW8HzW14XO/7SDwLp/0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=irl.hu; spf=pass smtp.mailfrom=irl.hu; arc=none smtp.client-ip=95.85.9.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=irl.hu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=irl.hu Received: from fedori.lan (51b69e54.dsl.pool.telekom.hu [::ffff:81.182.158.84]) (AUTH: CRAM-MD5 soyer@irl.hu, ) by irl.hu with ESMTPSA id 00000000000729AE.0000000065C295D9.001AD416; Tue, 06 Feb 2024 21:26:01 +0100 From: Gergo Koteles To: Shenghao Ding , Kevin Lu , Baojun Xu , Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Gergo Koteles , stable@vger.kernel.org Subject: [PATCH] ASoC: tas2781: remove unused acpi_subysystem_id Date: Tue, 6 Feb 2024 21:25:50 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mime-Autoconverted: from 8bit to 7bit by courier 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790182629538347391 X-GMAIL-MSGID: 1790182629538347391 The acpi_subysystem_id is only written and freed, not read, so unnecessary. Fixes: ef3bcde75d06 ("ASoC: tas2781: Add tas2781 driver") CC: stable@vger.kernel.org Signed-off-by: Gergo Koteles --- include/sound/tas2781.h | 1 - sound/pci/hda/tas2781_hda_i2c.c | 10 ---------- sound/soc/codecs/tas2781-comlib.c | 1 - 3 files changed, 12 deletions(-) base-commit: 610010737f74482a61896596a0116876ecf9e65c diff --git a/include/sound/tas2781.h b/include/sound/tas2781.h index 9aff384941de..99ca3e401fd1 100644 --- a/include/sound/tas2781.h +++ b/include/sound/tas2781.h @@ -103,7 +103,6 @@ struct tasdevice_priv { struct tm tm; enum device_catlog_id catlog_id; - const char *acpi_subsystem_id; unsigned char cal_binaryname[TASDEVICE_MAX_CHANNELS][64]; unsigned char crc8_lkp_tbl[CRC8_TABLE_SIZE]; unsigned char coef_binaryname[64]; diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c index 1bfb00102a77..02c85084aca5 100644 --- a/sound/pci/hda/tas2781_hda_i2c.c +++ b/sound/pci/hda/tas2781_hda_i2c.c @@ -129,18 +129,8 @@ static int tas2781_read_acpi(struct tasdevice_priv *p, const char *hid) acpi_dev_free_resource_list(&resources); strscpy(p->dev_name, hid, sizeof(p->dev_name)); - physdev = get_device(acpi_get_first_physical_node(adev)); acpi_dev_put(adev); - /* No side-effect to the playback even if subsystem_id is NULL*/ - sub = acpi_get_subsystem_id(ACPI_HANDLE(physdev)); - if (IS_ERR(sub)) - sub = NULL; - - p->acpi_subsystem_id = sub; - - put_device(physdev); - return 0; err: diff --git a/sound/soc/codecs/tas2781-comlib.c b/sound/soc/codecs/tas2781-comlib.c index 5d0e5348b361..3aa81514dad7 100644 --- a/sound/soc/codecs/tas2781-comlib.c +++ b/sound/soc/codecs/tas2781-comlib.c @@ -408,7 +408,6 @@ void tasdevice_remove(struct tasdevice_priv *tas_priv) { if (gpio_is_valid(tas_priv->irq_info.irq_gpio)) gpio_free(tas_priv->irq_info.irq_gpio); - kfree(tas_priv->acpi_subsystem_id); mutex_destroy(&tas_priv->codec_lock); } EXPORT_SYMBOL_GPL(tasdevice_remove);