aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAjay Singh <ajay.kathat@microchip.com>2018-09-25 11:53:38 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-25 20:53:57 +0200
commita944140250ce2f200d2b54fa7ec03aad4a5d6901 (patch)
tree9d8250c5e8fc1df9f254152e773ee6d6319035a2 /drivers
parent110f4b755e5df82fa4fe54612552dddfe9d58ad5 (diff)
staging: wilc1000: remove unnecessary memset in sdio_init() & wilc_spi_init()
Cleanup changes to avoid unnecessary setting 'wilc->bus_data' value to zero as the buffer was allocated using kzalloc(). Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/wilc1000/wilc_sdio.c4
-rw-r--r--drivers/staging/wilc1000/wilc_spi.c3
2 files changed, 1 insertions, 6 deletions
diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c
index 7ef047c21bae..ca351c950344 100644
--- a/drivers/staging/wilc1000/wilc_sdio.c
+++ b/drivers/staging/wilc1000/wilc_sdio.c
@@ -689,10 +689,8 @@ static int sdio_init(struct wilc *wilc, bool resume)
int loop, ret;
u32 chipid;
- if (!resume) {
- memset(sdio_priv, 0, sizeof(struct wilc_sdio));
+ if (!resume)
sdio_priv->irq_gpio = wilc->dev_irq_num;
- }
/**
* function 0 csa enable
diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c
index 2559cf02bff7..cef127b249fb 100644
--- a/drivers/staging/wilc1000/wilc_spi.c
+++ b/drivers/staging/wilc1000/wilc_spi.c
@@ -838,12 +838,9 @@ static int wilc_spi_init(struct wilc *wilc, bool resume)
return 1;
}
- memset(spi_priv, 0, sizeof(struct wilc_spi));
-
/*
* configure protocol
*/
- spi_priv->crc_off = 0;
/*
* TODO: We can remove the CRC trials if there is a definite