asoc: lpass-cdc: Update swr pdev initialize order
During sound card register init call, if swr pdev is not initialized yet respective soundwire port config is not updated to soundwire controller device. In macro drivers, update swr pdev into macro private data prior to platform device add. Change-Id: Ifa67471cfc7a10b102b573df6285e598bb0b5e5e Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
195771b877
commit
01756036b5
@@ -4027,17 +4027,7 @@ static void lpass_cdc_rx_macro_add_child_devices(struct work_struct *work)
|
||||
__func__, ctrl_num);
|
||||
goto fail_pdev_add;
|
||||
}
|
||||
}
|
||||
|
||||
ret = platform_device_add(pdev);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev,
|
||||
"%s: Cannot add platform device\n",
|
||||
__func__);
|
||||
goto fail_pdev_add;
|
||||
}
|
||||
|
||||
if (rx_swr_master_node) {
|
||||
temp = krealloc(swr_ctrl_data,
|
||||
(ctrl_num + 1) * sizeof(
|
||||
struct rx_swr_ctrl_data),
|
||||
@@ -4050,10 +4040,19 @@ static void lpass_cdc_rx_macro_add_child_devices(struct work_struct *work)
|
||||
swr_ctrl_data[ctrl_num].rx_swr_pdev = pdev;
|
||||
ctrl_num++;
|
||||
dev_dbg(&pdev->dev,
|
||||
"%s: Added soundwire ctrl device(s)\n",
|
||||
"%s: Adding soundwire ctrl device(s)\n",
|
||||
__func__);
|
||||
rx_priv->swr_ctrl_data = swr_ctrl_data;
|
||||
}
|
||||
|
||||
ret = platform_device_add(pdev);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev,
|
||||
"%s: Cannot add platform device\n",
|
||||
__func__);
|
||||
goto fail_pdev_add;
|
||||
}
|
||||
|
||||
if (rx_priv->child_count < LPASS_CDC_RX_MACRO_CHILD_DEVICES_MAX)
|
||||
rx_priv->pdev_child_devices[
|
||||
rx_priv->child_count++] = pdev;
|
||||
|
Reference in New Issue
Block a user