Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: tas2781: remove unused acpi_subysystem_id

The acpi_subysystem_id is only written and freed, not read, so
unnecessary.

Signed-off-by: Gergo Koteles <soyer@irl.hu>
Link: https://lore.kernel.org/r/454639336be28d2b50343e9c8366a56b0975e31d.1707456753.git.soyer@irl.hu
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Gergo Koteles and committed by
Mark Brown
4089d82e 6b4c7d4d

-14
-1
include/sound/tas2781.h
··· 103 103 struct tm tm; 104 104 105 105 enum device_catlog_id catlog_id; 106 - const char *acpi_subsystem_id; 107 106 unsigned char cal_binaryname[TASDEVICE_MAX_CHANNELS][64]; 108 107 unsigned char crc8_lkp_tbl[CRC8_TABLE_SIZE]; 109 108 unsigned char coef_binaryname[64];
-12
sound/pci/hda/tas2781_hda_i2c.c
··· 111 111 static int tas2781_read_acpi(struct tasdevice_priv *p, const char *hid) 112 112 { 113 113 struct acpi_device *adev; 114 - struct device *physdev; 115 114 LIST_HEAD(resources); 116 - const char *sub; 117 115 int ret; 118 116 119 117 adev = acpi_dev_get_first_match_dev(hid, NULL, -1); ··· 127 129 128 130 acpi_dev_free_resource_list(&resources); 129 131 strscpy(p->dev_name, hid, sizeof(p->dev_name)); 130 - physdev = get_device(acpi_get_first_physical_node(adev)); 131 132 acpi_dev_put(adev); 132 - 133 - /* No side-effect to the playback even if subsystem_id is NULL*/ 134 - sub = acpi_get_subsystem_id(ACPI_HANDLE(physdev)); 135 - if (IS_ERR(sub)) 136 - sub = NULL; 137 - 138 - p->acpi_subsystem_id = sub; 139 - 140 - put_device(physdev); 141 133 142 134 return 0; 143 135
-1
sound/soc/codecs/tas2781-comlib.c
··· 407 407 { 408 408 if (gpio_is_valid(tas_priv->irq_info.irq_gpio)) 409 409 gpio_free(tas_priv->irq_info.irq_gpio); 410 - kfree(tas_priv->acpi_subsystem_id); 411 410 mutex_destroy(&tas_priv->codec_lock); 412 411 } 413 412 EXPORT_SYMBOL_GPL(tasdevice_remove);