ASoC: tas2781: remove unused acpi_subysystem_id
Commit Message
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 <soyer@irl.hu>
---
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
Comments
On Tue, Feb 06, 2024 at 09:25:50PM +0100, Gergo Koteles wrote:
> The acpi_subysystem_id is only written and freed, not read, so
> unnecessary.
>
> Fixes: ef3bcde75d06 ("ASoC: tas2781: Add tas2781 driver")
What does this really "fix"? It's just a cleanup.
> CC: stable@vger.kernel.org
Again, what bug is this fixing?
Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
about what should be tagged for stable kernels, which this patch series
does not seem to fix.
thanks,
greg k-h
Hi Greg,
On Wed, 2024-02-07 at 10:02 +0000, Greg KH wrote:
> On Tue, Feb 06, 2024 at 09:25:50PM +0100, Gergo Koteles wrote:
> > The acpi_subysystem_id is only written and freed, not read, so
> > unnecessary.
> >
> > Fixes: ef3bcde75d06 ("ASoC: tas2781: Add tas2781 driver")
>
> What does this really "fix"? It's just a cleanup.
>
> > CC: stable@vger.kernel.org
>
> Again, what bug is this fixing?
>
> Please read:
> https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
> about what should be tagged for stable kernels, which this patch series
> does not seem to fix.
>
Yes, you are right, this is not really a bug.
I took the scope of "oh, that's not good" too wide.
Sorry for the noise.
thanks,
Gergo
@@ -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];
@@ -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:
@@ -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);