OSDN Git Service

staging: wilc1000: remove unnecessary memset in sdio_init() & wilc_spi_init()
authorAjay Singh <ajay.kathat@microchip.com>
Tue, 25 Sep 2018 06:23:38 +0000 (11:53 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Sep 2018 18:53:57 +0000 (20:53 +0200)
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>
drivers/staging/wilc1000/wilc_sdio.c
drivers/staging/wilc1000/wilc_spi.c

index 7ef047c..ca351c9 100644 (file)
@@ -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
index 2559cf0..cef127b 100644 (file)
@@ -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