mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
ASoC: tlv320aic26: remove keyclick sysfs file
aic26_probe() creates the keyclick sysfs file on the component device. The file callback uses the ASoC component pointer stored in the driver private data. There is no matching remove callback, so the sysfs file can remain after the component is removed while its backing component state is gone. Add a component remove callback that removes the keyclick file. Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn> Link: https://patch.msgid.link/20260615064549.34110-1-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
ce3733792d
commit
ae375f8d06
|
|
@ -320,8 +320,14 @@ static int aic26_probe(struct snd_soc_component *component)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void aic26_remove(struct snd_soc_component *component)
|
||||
{
|
||||
device_remove_file(component->dev, &dev_attr_keyclick);
|
||||
}
|
||||
|
||||
static const struct snd_soc_component_driver aic26_soc_component_dev = {
|
||||
.probe = aic26_probe,
|
||||
.remove = aic26_remove,
|
||||
.controls = aic26_snd_controls,
|
||||
.num_controls = ARRAY_SIZE(aic26_snd_controls),
|
||||
.dapm_widgets = tlv320aic26_dapm_widgets,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user