mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
ASoC: rockchip: multicodecs: Fix the build as module
ERROR: "snd_card_locked" [sound/soc/rockchip/snd-soc-rockchip-multicodecs.ko] undefined!
Fixes: 49950d606a ("ASoC: rockchip: multicodecs: add support property 'rockchip,wait-card-locked'")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I71b9ec38072d1a0147ad0f9c3b6198f89aa385ec
This commit is contained in:
@@ -148,8 +148,11 @@ static int wait_locked_card(struct device_node *np, struct device *dev)
|
||||
{
|
||||
char *propname = "rockchip,wait-card-locked";
|
||||
u32 cards[WAIT_CARDS];
|
||||
int num, i;
|
||||
int num;
|
||||
int ret;
|
||||
#ifndef MODULE
|
||||
int i;
|
||||
#endif
|
||||
|
||||
ret = of_property_count_u32_elems(np, propname);
|
||||
if (ret < 0) {
|
||||
@@ -186,6 +189,7 @@ static int wait_locked_card(struct device_node *np, struct device *dev)
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
#ifndef MODULE
|
||||
for (i = 0; i < num; i++) {
|
||||
if (!snd_card_locked(cards[i])) {
|
||||
dev_warn(dev, "card: %d has not been locked, re-probe again\n",
|
||||
@@ -194,6 +198,7 @@ static int wait_locked_card(struct device_node *np, struct device *dev)
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user