ath10k: add struct ath10k_bus_params
This struct is used as argument to ath10k_core_register in order to make it easier to add more bus parameters in the future. Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:

committed by
Kalle Valo

parent
39501ea641
commit
c0d8d56578
@@ -750,7 +750,7 @@ static int ath10k_ahb_probe(struct platform_device *pdev)
|
||||
enum ath10k_hw_rev hw_rev;
|
||||
size_t size;
|
||||
int ret;
|
||||
u32 chip_id;
|
||||
struct ath10k_bus_params bus_params;
|
||||
|
||||
of_id = of_match_device(ath10k_ahb_of_match, &pdev->dev);
|
||||
if (!of_id) {
|
||||
@@ -806,14 +806,14 @@ static int ath10k_ahb_probe(struct platform_device *pdev)
|
||||
|
||||
ath10k_pci_ce_deinit(ar);
|
||||
|
||||
chip_id = ath10k_ahb_soc_read32(ar, SOC_CHIP_ID_ADDRESS);
|
||||
if (chip_id == 0xffffffff) {
|
||||
bus_params.chip_id = ath10k_ahb_soc_read32(ar, SOC_CHIP_ID_ADDRESS);
|
||||
if (bus_params.chip_id == 0xffffffff) {
|
||||
ath10k_err(ar, "failed to get chip id\n");
|
||||
ret = -ENODEV;
|
||||
goto err_halt_device;
|
||||
}
|
||||
|
||||
ret = ath10k_core_register(ar, chip_id);
|
||||
ret = ath10k_core_register(ar, &bus_params);
|
||||
if (ret) {
|
||||
ath10k_err(ar, "failed to register driver core: %d\n", ret);
|
||||
goto err_halt_device;
|
||||
|
Reference in New Issue
Block a user