[PATCH v1 1/7] ALSA: hda: cs35l41: Remove redundant lock_system_sleep() calls
From: Stefan Binding
Date: Fri Nov 20 2026 - 11:12:50 EST
These calls are there to prevent sleep when adding or removing device
links in the bind/unbind calls. However, since these calls occur in
probe and remove calls, where sleep is blocked, this is unnecessary.
Signed-off-by: Stefan Binding <sbinding@xxxxxxxxxxxxxxxxxxxxx>
---
sound/hda/codecs/side-codecs/cs35l41_hda.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/sound/hda/codecs/side-codecs/cs35l41_hda.c b/sound/hda/codecs/side-codecs/cs35l41_hda.c
index 919630c11018..f6910916ad47 100644
--- a/sound/hda/codecs/side-codecs/cs35l41_hda.c
+++ b/sound/hda/codecs/side-codecs/cs35l41_hda.c
@@ -1443,7 +1443,6 @@ static int cs35l41_hda_bind(struct device *dev, struct device *master, void *mas
struct cs35l41_hda *cs35l41 = dev_get_drvdata(dev);
struct hda_component_parent *parent = master_data;
struct hda_component *comp;
- unsigned int sleep_flags;
int ret = 0;
comp = hda_component_from_index(parent, cs35l41->index);
@@ -1492,10 +1491,8 @@ static int cs35l41_hda_bind(struct device *dev, struct device *master, void *mas
mutex_unlock(&cs35l41->fw_mutex);
- sleep_flags = lock_system_sleep();
if (!device_link_add(&cs35l41->codec->core.dev, cs35l41->dev, DL_FLAG_STATELESS))
dev_warn(dev, "Unable to create device link\n");
- unlock_system_sleep(sleep_flags);
dev_info(cs35l41->dev,
"CS35L41 Bound - SSID: %s, BST: %d, VSPK: %d, CH: %c, FW EN: %d, SPKID: %d\n",
@@ -1512,16 +1509,13 @@ static void cs35l41_hda_unbind(struct device *dev, struct device *master, void *
struct cs35l41_hda *cs35l41 = dev_get_drvdata(dev);
struct hda_component_parent *parent = master_data;
struct hda_component *comp;
- unsigned int sleep_flags;
comp = hda_component_from_index(parent, cs35l41->index);
if (!comp)
return;
if (comp->dev == dev) {
- sleep_flags = lock_system_sleep();
device_link_remove(&cs35l41->codec->core.dev, cs35l41->dev);
- unlock_system_sleep(sleep_flags);
memset(comp, 0, sizeof(*comp));
cs35l41_remove_controls(cs35l41);
--
2.43.0