Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ath10k: copy the whole struct ath10k_bus_params in ath10k_core_register()

Instead of copying fields one by one copy the whole structure. This way there's
no need to modify the function every time we add a new field to the struct.

Compile tested only.

Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

+2 -3
+2 -3
drivers/net/wireless/ath/ath10k/core.c
··· 2997 2997 int ath10k_core_register(struct ath10k *ar, 2998 2998 const struct ath10k_bus_params *bus_params) 2999 2999 { 3000 - ar->bus_param.chip_id = bus_params->chip_id; 3001 - ar->bus_param.dev_type = bus_params->dev_type; 3002 - ar->bus_param.link_can_suspend = bus_params->link_can_suspend; 3000 + ar->bus_param = *bus_params; 3001 + 3003 3002 queue_work(ar->workqueue, &ar->register_work); 3004 3003 3005 3004 return 0;