From patchwork Tue Feb 6 21:34:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gergo Koteles X-Patchwork-Id: 197651 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1838326dyb; Tue, 6 Feb 2024 13:37:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IEaUtf3dmBWAlEU1727eV80WwhAlzPk2eZ5HDntQrIxtK/bFPig8N1KzDgI7ZjjVZz5YRl8 X-Received: by 2002:a17:902:cf4a:b0:1d9:b9ea:a1ee with SMTP id e10-20020a170902cf4a00b001d9b9eaa1eemr3449981plg.14.1707255475826; Tue, 06 Feb 2024 13:37:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707255475; cv=pass; d=google.com; s=arc-20160816; b=XM8pHci/K9bDMU9KC4tNIH449KnWibe96r/L7/5a1k4m0881wg9AyE9j2LoWv0Y0sL /sKAdVUubdPWOrmhGd+y7cyy6KhNAyk0uEdJlgRnqyfrNTUcBbrB9gQ8nVX7pBum/c5l s0sxqVJs9vI7quntW5WYSMbej8FDMFJ39iZ9t9pAxDyKXBqwbtb4/YHhVPE7wjz+osqz TV9zeY+3oStEgB2K1kaZszFb+qix2m7j3ViYsu8dRcNXlB3KUIN3OSO8v74kZkpSI7Y9 XtaX3ku8DaGruAjlGZKW8hFRm04UNlUjMnQ6gf2+p1DEFOQjWRyItIZ/0Widj6deWn1D M65g== 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:references:in-reply-to:message-id :date:subject:cc:to:from; bh=w1qEw07fkLXUO2t8m78Jmdko5va9914ZMYLMn4TU29U=; fh=udM1KVPlgkxxTf0R7h3etFykMVX44L4xNu7qtTV6i2c=; b=HdY/mmliWv3iiGLvyFSOt3gDSy7RtdTWHcpME+i3aY5zSB9j3J1Zbcb4CkPjnz+mnF Hfy0hPMlZVn+rwBYQ/lPVaXHrBM2vF3XYQXda8YQT8vpOTjWieaLIWK7e2srX8wTpaQP CdE8u5kBzqupVKDZOgtlL8DzH77ZcmIOrMUJ1v9jkHhb/0jqyGA7KFStQ/TjxYp0AMRz StRrrFZpt5xY7ItALV0RqSwyjomlO9JUrcf3Bg8gR3k0qLKUbdp9sUjcxtaDCftV1Iql MI11Jsb4y9N5GgszSL7C75mDQMOQT2wkvPhGyK9oxGVFeCy6qB0vVCjSeJ1UoEF6Yi12 sgMQ==; 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-55630-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55630-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu X-Forwarded-Encrypted: i=1; AJvYcCXIzoj2dkSoh9fKdkSXQRt74OqR2sOfc+5oG7aOCys9pJOXU6EPCMq1noabjEcqEqoVOauVazdZdD8Gm5d7jJqdNMaACA== Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id y11-20020a170903010b00b001d8f827d3desi2202894plc.303.2024.02.06.13.37.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 13:37:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55630-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::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-55630-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55630-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id DAAB2B244F6 for ; Tue, 6 Feb 2024 21:34:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 882211BDE2; Tue, 6 Feb 2024 21:34:27 +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 DBE201B948; Tue, 6 Feb 2024 21:34:23 +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=1707255266; cv=none; b=EhWyIluoTDl3eSMYqNQ9XzOh2onXB43x7R0La252mJkK4WYp4XVNvFXj871mQXuuPom1KRRMlaKQ2XbcFagWAJH2SbnloynqOXSG2VfCvKXGkIDWmu/Madwbf3Hv18cvSXAtYizYqHBPOcEAwVDS73XhiHK1t+ZTH0mCrRwjiWU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707255266; c=relaxed/simple; bh=lN/DzMj73K1wgPn7GGx2AO9rEBiIvV4udCd5v0dcclE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Mime-Version:Content-Type; b=lYazsjToX+v5KrciIJChqBLiZDtm05/2q+7Uv66yuATSAffwsyAwORmL8HVn9lu+zfIY1UJEymuCQxiIJn80OulpR2LurjgcxhT29HOZho+NqUzj39HUvDuVoA0pxW4NoxodzkGQglCYvNURnyE2rsd5QDHmpOwCIGhVYhbr5Uc= 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 0000000000073787.0000000065C2A5DD.001AD62E; Tue, 06 Feb 2024 22:34:21 +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 v2] ASoC: tas2781: remove unused acpi_subysystem_id Date: Tue, 6 Feb 2024 22:34:15 +0100 Message-ID: <631722b9ec0a4a2667d68f4747f01f3f7eb8ceb8.1707255177.git.soyer@irl.hu> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: 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: 1790187118086562266 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 | 11 ----------- sound/soc/codecs/tas2781-comlib.c | 1 - 3 files changed, 13 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..2fd391bc693a 100644 --- a/sound/pci/hda/tas2781_hda_i2c.c +++ b/sound/pci/hda/tas2781_hda_i2c.c @@ -111,7 +111,6 @@ static int tas2781_get_i2c_res(struct acpi_resource *ares, void *data) static int tas2781_read_acpi(struct tasdevice_priv *p, const char *hid) { struct acpi_device *adev; - struct device *physdev; LIST_HEAD(resources); const char *sub; int ret; @@ -129,18 +128,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);