wl1251: Prepare for idle mode support
[pandora-wifi.git] / drivers / net / wireless / wl12xx / wl1251_spi.c
index 7464ecc..7a198f7 100644 (file)
 #include "wl1251_reg.h"
 #include "wl1251_spi.h"
 
-static irqreturn_t wl1251_irq(int irq, void *cookie)
+static irqreturn_t wl1251_line_irq(int irq, void *cookie)
 {
-       struct wl1251 *wl;
-
-       wl1251_debug(DEBUG_IRQ, "IRQ");
-
-       wl = cookie;
+       struct wl1251 *wl = cookie;
 
-       ieee80211_queue_work(wl->hw, &wl->irq_work);
+       wl1251_irq(wl);
 
        return IRQ_HANDLED;
 }
@@ -76,6 +72,8 @@ static void wl1251_spi_reset(struct wl1251 *wl)
        spi_sync(wl_to_spi(wl), &m);
 
        wl1251_dump(DEBUG_SPI, "spi reset -> ", cmd, WSPI_INIT_CMD_LEN);
+
+       kfree(cmd);
 }
 
 static void wl1251_spi_wake(struct wl1251 *wl)
@@ -130,6 +128,8 @@ static void wl1251_spi_wake(struct wl1251 *wl)
        spi_sync(wl_to_spi(wl), &m);
 
        wl1251_dump(DEBUG_SPI, "spi init -> ", cmd, WSPI_INIT_CMD_LEN);
+
+       kfree(cmd);
 }
 
 static void wl1251_spi_reset_wake(struct wl1251 *wl)
@@ -275,7 +275,7 @@ static int __devinit wl1251_spi_probe(struct spi_device *spi)
 
        wl->use_eeprom = pdata->use_eeprom;
 
-       ret = request_irq(wl->irq, wl1251_irq, 0, DRIVER_NAME, wl);
+       ret = request_irq(wl->irq, wl1251_line_irq, 0, DRIVER_NAME, wl);
        if (ret < 0) {
                wl1251_error("request_irq() failed: %d", ret);
                goto out_free;
@@ -347,3 +347,4 @@ module_exit(wl1251_spi_exit);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Kalle Valo <kalle.valo@nokia.com>");
+MODULE_ALIAS("spi:wl1251");