Skip to content

Commit 5a4c1f0

Browse files
krzkvinodkoul
authored andcommitted
soundwire: bus: simplify by using local slave->prop
The sdw_initialize_slave() function stores 'slave->prop' as local 'prop' variable, so use it in all applicable places to make code a bit simpler. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 8e8c0df commit 5a4c1f0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/soundwire/bus.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1410,7 +1410,7 @@ static int sdw_initialize_slave(struct sdw_slave *slave)
14101410
}
14111411
}
14121412
if ((slave->bus->prop.quirks & SDW_MASTER_QUIRKS_CLEAR_INITIAL_PARITY) &&
1413-
!(slave->prop.quirks & SDW_SLAVE_QUIRKS_INVALID_INITIAL_PARITY)) {
1413+
!(prop->quirks & SDW_SLAVE_QUIRKS_INVALID_INITIAL_PARITY)) {
14141414
/* Clear parity interrupt before enabling interrupt mask */
14151415
status = sdw_read_no_pm(slave, SDW_SCP_INT1);
14161416
if (status < 0) {
@@ -1436,7 +1436,7 @@ static int sdw_initialize_slave(struct sdw_slave *slave)
14361436
* device-dependent, it might e.g. only be enabled in
14371437
* steady-state after a couple of frames.
14381438
*/
1439-
val = slave->prop.scp_int1_mask;
1439+
val = prop->scp_int1_mask;
14401440

14411441
/* Enable SCP interrupts */
14421442
ret = sdw_update_no_pm(slave, SDW_SCP_INTMASK1, val, val);
@@ -1447,7 +1447,7 @@ static int sdw_initialize_slave(struct sdw_slave *slave)
14471447
}
14481448

14491449
/* No need to continue if DP0 is not present */
1450-
if (!slave->prop.dp0_prop)
1450+
if (!prop->dp0_prop)
14511451
return 0;
14521452

14531453
/* Enable DP0 interrupts */

0 commit comments

Comments
 (0)