summaryrefslogtreecommitdiffstats
path: root/drivers/soundwire/slave.c
diff options
context:
space:
mode:
authorVinod Koul <vkoul@kernel.org>2020-09-03 17:14:58 +0530
committerVinod Koul <vkoul@kernel.org>2020-09-04 14:46:42 +0530
commitbd6a024f21ceb37025dfd584f59cfeba850c8e02 (patch)
treec1d825da00502e4656117af79cdc4f36eaef393e /drivers/soundwire/slave.c
parentd5826a4bdbc88004279df1f24db61e8e48071f78 (diff)
downloadlinux-bd6a024f21ceb37025dfd584f59cfeba850c8e02.tar.bz2
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: Vinod Koul <vkoul@kernel.org> Tested-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20200903114504.1202143-4-vkoul@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire/slave.c')
-rw-r--r--drivers/soundwire/slave.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soundwire/slave.c b/drivers/soundwire/slave.c
index a762ee24e6fa..2191dd6e7aa4 100644
--- a/drivers/soundwire/slave.c
+++ b/drivers/soundwire/slave.c
@@ -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)