]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ASoC: tas2781: remove unused acpi_subysystem_id
authorGergo Koteles <soyer@irl.hu>
Fri, 9 Feb 2024 05:59:34 +0000 (06:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:29:04 +0000 (16:29 +0200)
[ Upstream commit 4089d82e67a9967fc5bf2b4e5ef820d67fe73924 ]

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>
Stable-dep-of: c2c0b67dca3c ("ASoC: tas2781-i2c: Drop weird GPIO code")
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/sound/tas2781.h
sound/pci/hda/tas2781_hda_i2c.c
sound/soc/codecs/tas2781-comlib.c

index be58d870505a4b2b0c02d8728d60092c4e8dd05e..be6f70dd54f936e13dc4bdceff5e33986e925d62 100644 (file)
@@ -101,7 +101,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];
index e5bb1fed26a0c85c8eea192f354a5b19d84d036a..0a587f55583ff97fad45038ca4f784b52890c82e 100644 (file)
@@ -95,9 +95,7 @@ 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;
 
        adev = acpi_dev_get_first_match_dev(hid, NULL, -1);
@@ -113,18 +111,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:
index 5d0e5348b361a568475fd1fde3a299a57926b365..3aa81514dad76f319e3bd0fc86b1709855dde28c 100644 (file)
@@ -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);