int wcd9xxx_init_slimslave(struct wcd9xxx *wcd9xxx, u8 wcd9xxx_pgd_la) { int ret = 0; ret = wcd9xxx_configure_ports(wcd9xxx); if (ret) { pr_err("%s: Failed to configure register address offset\n", __func__); goto err; } ret = wcd9xxx_alloc_slim_sh_ch_rx(wcd9xxx, wcd9xxx_pgd_la); if (ret) { pr_err("%s: Failed to alloc rx slimbus shared channels\n", __func__); goto err; } ret = wcd9xxx_alloc_slim_sh_ch_tx(wcd9xxx, wcd9xxx_pgd_la); if (ret) { pr_err("%s: Failed to alloc tx slimbus shared channels\n", __func__); goto tx_err; } return 0; tx_err: wcd9xxx_dealloc_slim_sh_ch_rx(wcd9xxx); err: return ret; }
int wcd9xxx_init_slimslave(struct wcd9xxx *wcd9xxx, u8 wcd9xxx_pgd_la) { int ret = 0; ret = wcd9xxx_alloc_slim_sh_ch_rx(wcd9xxx, wcd9xxx_pgd_la); if (ret) { pr_err("%s: Failed to alloc rx slimbus shared channels\n", __func__); goto rx_err; } ret = wcd9xxx_alloc_slim_sh_ch_tx(wcd9xxx, wcd9xxx_pgd_la); if (ret) { pr_err("%s: Failed to alloc tx slimbus shared channels\n", __func__); goto tx_err; } return 0; tx_err: wcd9xxx_dealloc_slim_sh_ch_rx(wcd9xxx); rx_err: return ret; }