diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2023-01-19 10:32:11 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2023-01-31 17:31:52 +0300 |
commit | 66f95de7c13be5e442d8ed4cf00e13f8dbdc1315 (patch) | |
tree | 18cacb1c2a0e005c99df3ae108b2cce957b90df9 /drivers/soundwire | |
parent | dd0b9619a21ef77127e6002f9cb2d254c03ceed1 (diff) | |
download | linux-66f95de7c13be5e442d8ed4cf00e13f8dbdc1315.tar.xz |
soundwire: cadence: further simplify low-level xfer_msg_defer() callback
The message pointer is already stored in the bus->defer structure, not
need to pass it as an argument.
Suggested-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20230119073211.85979-5-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire')
-rw-r--r-- | drivers/soundwire/bus.c | 2 | ||||
-rw-r--r-- | drivers/soundwire/cadence_master.c | 5 | ||||
-rw-r--r-- | drivers/soundwire/cadence_master.h | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 29d644bb4020..b6aca59c3130 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bus.c @@ -237,7 +237,7 @@ static inline int do_transfer_defer(struct sdw_bus *bus, init_completion(&defer->complete); for (i = 0; i <= retry; i++) { - resp = bus->ops->xfer_msg_defer(bus, msg); + resp = bus->ops->xfer_msg_defer(bus); ret = find_response_code(resp); /* if cmd is ok or ignored return */ if (ret == 0 || ret == -ENODATA) diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c index 65fcb28c8f58..e835dabb516c 100644 --- a/drivers/soundwire/cadence_master.c +++ b/drivers/soundwire/cadence_master.c @@ -749,10 +749,11 @@ cdns_xfer_msg(struct sdw_bus *bus, struct sdw_msg *msg) EXPORT_SYMBOL(cdns_xfer_msg); enum sdw_command_response -cdns_xfer_msg_defer(struct sdw_bus *bus, - struct sdw_msg *msg) +cdns_xfer_msg_defer(struct sdw_bus *bus) { struct sdw_cdns *cdns = bus_to_cdns(bus); + struct sdw_defer *defer = &bus->defer_msg; + struct sdw_msg *msg = defer->msg; int cmd = 0, ret; /* for defer only 1 message is supported */ diff --git a/drivers/soundwire/cadence_master.h b/drivers/soundwire/cadence_master.h index 90289a3dd505..dec0b4f993c1 100644 --- a/drivers/soundwire/cadence_master.h +++ b/drivers/soundwire/cadence_master.h @@ -184,7 +184,7 @@ enum sdw_command_response cdns_xfer_msg(struct sdw_bus *bus, struct sdw_msg *msg); enum sdw_command_response -cdns_xfer_msg_defer(struct sdw_bus *bus, struct sdw_msg *msg); +cdns_xfer_msg_defer(struct sdw_bus *bus); u32 cdns_read_ping_status(struct sdw_bus *bus); |