From: Kalle Valo Date: Mon, 11 Feb 2019 16:48:13 +0000 (+0200) Subject: ath10k: copy the whole struct ath10k_bus_params in ath10k_core_register() X-Git-Tag: v5.4-rc1~1543^2~131^2~1^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=01dc76dfdc917282121220abcc2ae0e7308b441f;p=platform%2Fkernel%2Flinux-rpi.git 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 --- diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c index 6c1dd5f..a1b2aea 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -2997,9 +2997,8 @@ err: int ath10k_core_register(struct ath10k *ar, const struct ath10k_bus_params *bus_params) { - ar->bus_param.chip_id = bus_params->chip_id; - ar->bus_param.dev_type = bus_params->dev_type; - ar->bus_param.link_can_suspend = bus_params->link_can_suspend; + ar->bus_param = *bus_params; + queue_work(ar->workqueue, &ar->register_work); return 0;