From 545a8aa793e04bee7a7e2aa8caa70bed94fd7a5c Mon Sep 17 00:00:00 2001 From: Nikanth Karthikesan Date: Tue, 14 Jun 2011 11:23:46 +0530 Subject: [PATCH] if_spi: Fix compilation warning - unused variable MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit if_spi: Fix compilation warning - unused variable 'spi' drivers/net/wireless/libertas/if_spi.c: In function ‘if_spi_init_card’: drivers/net/wireless/libertas/if_spi.c:1035: warning: unused variable ‘spi’ The variable is used only in a macro which uses the args only for DEBUG builds. Remove the 'spi' variable completely. Signed-off-by: Nikanth Karthikesan Acked-by: Dan Williams Signed-off-by: John W. Linville --- drivers/net/wireless/libertas/if_spi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c index 463352c890d7..d041bb2b5777 100644 --- a/drivers/net/wireless/libertas/if_spi.c +++ b/drivers/net/wireless/libertas/if_spi.c @@ -1032,7 +1032,6 @@ static irqreturn_t if_spi_host_interrupt(int irq, void *dev_id) static int if_spi_init_card(struct if_spi_card *card) { struct lbs_private *priv = card->priv; - struct spi_device *spi = card->spi; int err, i; u32 scratch; const struct firmware *helper = NULL; @@ -1080,8 +1079,9 @@ static int if_spi_init_card(struct if_spi_card *card) "attached to SPI bus_num %d, chip_select %d. " "spi->max_speed_hz=%d\n", card->card_id, card->card_rev, - spi->master->bus_num, spi->chip_select, - spi->max_speed_hz); + card->spi->master->bus_num, + card->spi->chip_select, + card->spi->max_speed_hz); err = if_spi_prog_helper_firmware(card, helper); if (err) goto out; -- 2.30.2