Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01dc76df authored by Kalle Valo's avatar Kalle Valo
Browse files

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: default avatarKalle Valo <kvalo@codeaurora.org>
parent bdf2bd9a
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -2997,9 +2997,8 @@ static void ath10k_core_register_work(struct work_struct *work)
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;