ath10k: initialise struct ath10k_bus params to zero

This way we don't need to set every variable and give them to default, which is
zero. This is also safer in case we forgot to initalise a new field in some of
the bus modules.

Compile tested only.

Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
Kalle Valo 2019-04-19 10:28:52 +03:00
parent e2a6b71128
commit 6d084ac27a
5 changed files with 5 additions and 5 deletions

View File

@ -740,7 +740,7 @@ static int ath10k_ahb_probe(struct platform_device *pdev)
enum ath10k_hw_rev hw_rev; enum ath10k_hw_rev hw_rev;
size_t size; size_t size;
int ret; int ret;
struct ath10k_bus_params bus_params; struct ath10k_bus_params bus_params = {};
of_id = of_match_device(ath10k_ahb_of_match, &pdev->dev); of_id = of_match_device(ath10k_ahb_of_match, &pdev->dev);
if (!of_id) { if (!of_id) {

View File

@ -3478,7 +3478,7 @@ static int ath10k_pci_probe(struct pci_dev *pdev,
struct ath10k *ar; struct ath10k *ar;
struct ath10k_pci *ar_pci; struct ath10k_pci *ar_pci;
enum ath10k_hw_rev hw_rev; enum ath10k_hw_rev hw_rev;
struct ath10k_bus_params bus_params; struct ath10k_bus_params bus_params = {};
bool pci_ps; bool pci_ps;
int (*pci_soft_reset)(struct ath10k *ar); int (*pci_soft_reset)(struct ath10k *ar);
int (*pci_hard_reset)(struct ath10k *ar); int (*pci_hard_reset)(struct ath10k *ar);

View File

@ -1954,7 +1954,7 @@ static int ath10k_sdio_probe(struct sdio_func *func,
struct ath10k *ar; struct ath10k *ar;
enum ath10k_hw_rev hw_rev; enum ath10k_hw_rev hw_rev;
u32 dev_id_base; u32 dev_id_base;
struct ath10k_bus_params bus_params; struct ath10k_bus_params bus_params = {};
int ret, i; int ret, i;
/* Assumption: All SDIO based chipsets (so far) are QCA6174 based. /* Assumption: All SDIO based chipsets (so far) are QCA6174 based.

View File

@ -1249,7 +1249,7 @@ out:
int ath10k_snoc_fw_indication(struct ath10k *ar, u64 type) int ath10k_snoc_fw_indication(struct ath10k *ar, u64 type)
{ {
struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar);
struct ath10k_bus_params bus_params; struct ath10k_bus_params bus_params = {};
int ret; int ret;
if (test_bit(ATH10K_SNOC_FLAG_UNREGISTERING, &ar_snoc->flags)) if (test_bit(ATH10K_SNOC_FLAG_UNREGISTERING, &ar_snoc->flags))

View File

@ -973,7 +973,7 @@ static int ath10k_usb_probe(struct usb_interface *interface,
struct usb_device *dev = interface_to_usbdev(interface); struct usb_device *dev = interface_to_usbdev(interface);
int ret, vendor_id, product_id; int ret, vendor_id, product_id;
enum ath10k_hw_rev hw_rev; enum ath10k_hw_rev hw_rev;
struct ath10k_bus_params bus_params; struct ath10k_bus_params bus_params = {};
/* Assumption: All USB based chipsets (so far) are QCA9377 based. /* Assumption: All USB based chipsets (so far) are QCA9377 based.
* If there will be newer chipsets that does not use the hw reg * If there will be newer chipsets that does not use the hw reg