mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
soundwire: only handle alert events when the peripheral is attached
It doesn't make sense to handle an alert event when the peripheral is not attached. The slave->status could be SDW_SLAVE_ATTACHED or SDW_SLAVE_ALERT when it is attached on the bus. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> Link: https://patch.msgid.link/20260520025720.1999367-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
8a7fe10eec
commit
38cd651ebc
|
|
@ -1958,6 +1958,10 @@ int sdw_handle_slave_status(struct sdw_bus *bus,
|
|||
break;
|
||||
|
||||
case SDW_SLAVE_ALERT:
|
||||
if (slave->status != SDW_SLAVE_ATTACHED &&
|
||||
slave->status != SDW_SLAVE_ALERT)
|
||||
continue;
|
||||
|
||||
ret = sdw_handle_slave_alerts(slave);
|
||||
if (ret < 0)
|
||||
dev_err(&slave->dev,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user