Search Linux Wireless

[PATCH v5 6/9] wifi: wilc1000: Remove cmd53_buf() allocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The cmd53_buf is a 4 byte buffer, embed it into the struct wilc_sdio.

Signed-off-by: Marek Vasut <marex@xxxxxxx>
---
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
Cc: Adham Abozaeid <adham.abozaeid@xxxxxxxxxxxxx>
Cc: Ajay Singh <ajay.kathat@xxxxxxxxxxxxx>
Cc: Alexis Lothoré <alexis.lothore@xxxxxxxxxxx>
Cc: Claudiu Beznea <claudiu.beznea@xxxxxxxxx>
Cc: Conor Dooley <conor+dt@xxxxxxxxxx>
Cc: Eric Dumazet <edumazet@xxxxxxxxxx>
Cc: Jakub Kicinski <kuba@xxxxxxxxxx>
Cc: Kalle Valo <kvalo@xxxxxxxxxx>
Cc: Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>
Cc: Paolo Abeni <pabeni@xxxxxxxxxx>
Cc: Rob Herring <robh@xxxxxxxxxx>
Cc: devicetree@xxxxxxxxxxxxxxx
Cc: linux-wireless@xxxxxxxxxxxxxxx
Cc: netdev@xxxxxxxxxxxxxxx
---
V5: New patch
---
 drivers/net/wireless/microchip/wilc1000/sdio.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/net/wireless/microchip/wilc1000/sdio.c b/drivers/net/wireless/microchip/wilc1000/sdio.c
index c26447289b71b..6d01a838ab184 100644
--- a/drivers/net/wireless/microchip/wilc1000/sdio.c
+++ b/drivers/net/wireless/microchip/wilc1000/sdio.c
@@ -31,7 +31,7 @@ struct wilc_sdio {
 	bool irq_gpio;
 	u32 block_size;
 	bool isinit;
-	u8 *cmd53_buf;
+	u8 cmd53_buf[4];
 };
 
 struct sdio_cmd52 {
@@ -149,12 +149,6 @@ static int wilc_sdio_probe(struct sdio_func *func,
 	if (!sdio_priv)
 		return -ENOMEM;
 
-	sdio_priv->cmd53_buf = kzalloc(sizeof(u32), GFP_KERNEL);
-	if (!sdio_priv->cmd53_buf) {
-		ret = -ENOMEM;
-		goto free;
-	}
-
 	ret = wilc_cfg80211_init(&wilc, &func->dev, WILC_HIF_SDIO,
 				 &wilc_hif_sdio);
 	if (ret)
@@ -207,7 +201,6 @@ static int wilc_sdio_probe(struct sdio_func *func,
 	irq_dispose_mapping(wilc->dev_irq_num);
 	wilc_netdev_cleanup(wilc);
 free:
-	kfree(sdio_priv->cmd53_buf);
 	kfree(sdio_priv);
 	return ret;
 }
@@ -219,7 +212,6 @@ static void wilc_sdio_remove(struct sdio_func *func)
 
 	clk_disable_unprepare(wilc->rtc_clk);
 	wilc_netdev_cleanup(wilc);
-	kfree(sdio_priv->cmd53_buf);
 	kfree(sdio_priv);
 }
 
-- 
2.45.2





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux