提交 d6f1c1c3 编写于 作者: E Eliot Blennerhassett 提交者: Takashi Iwai

ALSA: asihpi - Allow adapters with duplicate index jumpers to be discovered.

Signed-off-by: NEliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 fc3a3990
......@@ -78,8 +78,18 @@ u16 hpi_add_adapter(struct hpi_adapter_obj *pao)
}
if (adapters.adapter[pao->index].adapter_type) {
{
retval = HPI_DUPLICATE_ADAPTER_NUMBER;
int a;
for (a = HPI_MAX_ADAPTERS - 1; a >= 0; a--) {
if (!adapters.adapter[a].adapter_type) {
HPI_DEBUG_LOG(WARNING,
"ASI%X duplicate index %d moved to %d\n",
pao->adapter_type, pao->index, a);
pao->index = a;
break;
}
}
if (a < 0) {
retval = HPI_ERROR_DUPLICATE_ADAPTER_NUMBER;
goto unlock;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册