wl1251: use wiphy_dev instead of wl->spi->dev
authorBob Copeland <me@bobcopeland.com>
Fri, 7 Aug 2009 10:33:04 +0000 (13:33 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 14 Aug 2009 13:13:36 +0000 (09:13 -0400)
Remove a dependency on the bus-specific struct device by using wiphy_dev
when requesting firmware.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/wl12xx/wl1251_main.c

index a858e4dc20eb5eb79226b6d4806f8350e18595aa..953cdb4fd38f6b264894e9ec0bc64ccf95f0c2bd 100644 (file)
@@ -75,9 +75,10 @@ static irqreturn_t wl1251_irq(int irq, void *cookie)
 static int wl1251_fetch_firmware(struct wl1251 *wl)
 {
        const struct firmware *fw;
+       struct device *dev = wiphy_dev(wl->hw->wiphy);
        int ret;
 
-       ret = request_firmware(&fw, wl->chip.fw_filename, &wl->spi->dev);
+       ret = request_firmware(&fw, wl->chip.fw_filename, dev);
 
        if (ret < 0) {
                wl1251_error("could not get firmware: %d", ret);
@@ -113,9 +114,10 @@ out:
 static int wl1251_fetch_nvs(struct wl1251 *wl)
 {
        const struct firmware *fw;
+       struct device *dev = wiphy_dev(wl->hw->wiphy);
        int ret;
 
-       ret = request_firmware(&fw, wl->chip.nvs_filename, &wl->spi->dev);
+       ret = request_firmware(&fw, wl->chip.nvs_filename, dev);
 
        if (ret < 0) {
                wl1251_error("could not get nvs file: %d", ret);