mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
i3c: master: Add missing runtime PM get in dev_nack_retry_count_store()
Ensure the device is runtime resumed while updating the retry
configuration to avoid accessing the controller while suspended.
Call i3c_master_rpm_get() before accessing the controller in
dev_nack_retry_count_store() and release it with
i3c_master_rpm_put() afterwards.
Fixes: 990c149c61 ("i3c: master: Introduce optional Runtime PM support")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260616113752.196140-3-adrian.hunter@intel.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
ab5f9c5cb5
commit
79ce29e100
|
|
@ -767,12 +767,18 @@ static ssize_t dev_nack_retry_count_store(struct device *dev,
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = i3c_master_rpm_get(master);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
i3c_bus_maintenance_lock(i3cbus);
|
||||
ret = master->ops->set_dev_nack_retry(master, val);
|
||||
if (!ret)
|
||||
master->dev_nack_retry_count = val;
|
||||
i3c_bus_maintenance_unlock(i3cbus);
|
||||
|
||||
i3c_master_rpm_put(master);
|
||||
|
||||
return ret ?: count;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user