Commit bd6a024f authored by Vinod Koul's avatar Vinod Koul

soundwire: slave: use SDW_DISCO_LINK_ID()

use SDW_DISCO_LINK_ID() in slave code to extract field values instead of
open coding masks and shift operations to extract link_id
Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
Tested-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200903114504.1202143-4-vkoul@kernel.orgSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent d5826a4b
......@@ -106,7 +106,7 @@ static bool find_slave(struct sdw_bus *bus,
}
/* Extract link id from ADR, Bit 51 to 48 (included) */
link_id = (addr >> 48) & GENMASK(3, 0);
link_id = SDW_DISCO_LINK_ID(addr);
/* Check for link_id match */
if (link_id != bus->link_id)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment