diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/libertas/if_spi.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c index b213de437ae6..963c20125fc9 100644 --- a/drivers/net/wireless/libertas/if_spi.c +++ b/drivers/net/wireless/libertas/if_spi.c | |||
@@ -737,7 +737,7 @@ static int if_spi_c2h_data(struct if_spi_card *card) | |||
737 | goto out; | 737 | goto out; |
738 | } else if (len > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE) { | 738 | } else if (len > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE) { |
739 | lbs_pr_err("%s: error: card has %d bytes of data, but " | 739 | lbs_pr_err("%s: error: card has %d bytes of data, but " |
740 | "our maximum skb size is %lu\n", | 740 | "our maximum skb size is %zu\n", |
741 | __func__, len, MRVDRV_ETH_RX_PACKET_BUFFER_SIZE); | 741 | __func__, len, MRVDRV_ETH_RX_PACKET_BUFFER_SIZE); |
742 | err = -EINVAL; | 742 | err = -EINVAL; |
743 | goto out; | 743 | goto out; |
@@ -1170,12 +1170,13 @@ static int __devexit libertas_spi_remove(struct spi_device *spi) | |||
1170 | 1170 | ||
1171 | lbs_deb_spi("libertas_spi_remove\n"); | 1171 | lbs_deb_spi("libertas_spi_remove\n"); |
1172 | lbs_deb_enter(LBS_DEB_SPI); | 1172 | lbs_deb_enter(LBS_DEB_SPI); |
1173 | priv->surpriseremoved = 1; | ||
1174 | 1173 | ||
1175 | lbs_stop_card(priv); | 1174 | lbs_stop_card(priv); |
1175 | lbs_remove_card(priv); /* will call free_netdev */ | ||
1176 | |||
1177 | priv->surpriseremoved = 1; | ||
1176 | free_irq(spi->irq, card); | 1178 | free_irq(spi->irq, card); |
1177 | if_spi_terminate_spi_thread(card); | 1179 | if_spi_terminate_spi_thread(card); |
1178 | lbs_remove_card(priv); /* will call free_netdev */ | ||
1179 | if (card->pdata->teardown) | 1180 | if (card->pdata->teardown) |
1180 | card->pdata->teardown(spi); | 1181 | card->pdata->teardown(spi); |
1181 | free_if_spi_card(card); | 1182 | free_if_spi_card(card); |