summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1271_spi.c
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2010-03-18 12:26:31 +0200
committerJohn W. Linville <linville@tuxdriver.com>2010-03-23 16:50:20 -0400
commita1dd8187d8d8f565976c9e55374dee520cdc2fa3 (patch)
tree79325182613284e2c2a2023a401da32f7b93bd25 /drivers/net/wireless/wl12xx/wl1271_spi.c
parent1b00f546fc4271d94c1bccb1955ce64d9ace1000 (diff)
wl1271: Move platform device registration from _spi to _main
In order to get the platform device for both SPI and SDIO, move the platform device registration to wl1271_main.c from wl1271_spi.c. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_spi.c')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_spi.c31
1 files changed, 2 insertions, 29 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_spi.c b/drivers/net/wireless/wl12xx/wl1271_spi.c
index 0eea73392ea..4c129c76c29 100644
--- a/drivers/net/wireless/wl12xx/wl1271_spi.c
+++ b/drivers/net/wireless/wl12xx/wl1271_spi.c
@@ -23,7 +23,6 @@
#include <linux/irq.h>
#include <linux/module.h>
-#include <linux/platform_device.h>
#include <linux/crc7.h>
#include <linux/spi/spi.h>
#include <linux/spi/wl12xx.h>
@@ -332,21 +331,6 @@ static irqreturn_t wl1271_irq(int irq, void *cookie)
return IRQ_HANDLED;
}
-static void wl1271_device_release(struct device *dev)
-{
-
-}
-
-static struct platform_device wl1271_device = {
- .name = "wl1271",
- .id = -1,
-
- /* device model insists to have a release function */
- .dev = {
- .release = wl1271_device_release,
- },
-};
-
static void wl1271_spi_set_power(struct wl1271 *wl, bool enable)
{
if (wl->set_power)
@@ -422,28 +406,18 @@ static int __devinit wl1271_probe(struct spi_device *spi)
disable_irq(wl->irq);
- ret = platform_device_register(&wl1271_device);
- if (ret) {
- wl1271_error("couldn't register platform device");
- goto out_irq;
- }
- dev_set_drvdata(&wl1271_device.dev, wl);
-
ret = wl1271_init_ieee80211(wl);
if (ret)
- goto out_platform;
+ goto out_irq;
ret = wl1271_register_hw(wl);
if (ret)
- goto out_platform;
+ goto out_irq;
wl1271_notice("initialized");
return 0;
- out_platform:
- platform_device_unregister(&wl1271_device);
-
out_irq:
free_irq(wl->irq, wl);
@@ -457,7 +431,6 @@ static int __devexit wl1271_remove(struct spi_device *spi)
{
struct wl1271 *wl = dev_get_drvdata(&spi->dev);
- platform_device_unregister(&wl1271_device);
free_irq(wl->irq, wl);
wl1271_free_hw(wl);