Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
[pandora-kernel.git] / arch / arm / mach-omap2 / board-omap3pandora.c
index e64bcb6..0b34bed 100644 (file)
@@ -636,36 +636,19 @@ static struct spi_board_info omap3pandora_spi_board_info[] __initdata = {
 
 static void __init omap3pandora_init_irq(void)
 {
-       omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
-                            mt46h32m32lf6_sdrc_params);
+       omap2_init_common_infrastructure();
+       omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
+                                 mt46h32m32lf6_sdrc_params);
        omap_init_irq();
 }
 
-static void pandora_wl1251_set_power(bool enable)
-{
-       /*
-        * Keep power always on until wl1251_sdio driver learns to re-init
-        * the chip after powering it down and back up.
-        */
-}
-
-static struct wl12xx_platform_data pandora_wl1251_pdata = {
-       .set_power      = pandora_wl1251_set_power,
-       .use_eeprom     = true,
-};
-
-static struct platform_device pandora_wl1251_data = {
-       .name           = "wl1251_data",
-       .id             = -1,
-       .dev            = {
-               .platform_data  = &pandora_wl1251_pdata,
-       },
-};
-
-static void pandora_wl1251_init(void)
+static void __init pandora_wl1251_init(void)
 {
+       struct wl12xx_platform_data pandora_wl1251_pdata;
        int ret;
 
+       memset(&pandora_wl1251_pdata, 0, sizeof(pandora_wl1251_pdata));
+
        ret = gpio_request(PANDORA_WIFI_IRQ_GPIO, "wl1251 irq");
        if (ret < 0)
                goto fail;
@@ -678,6 +661,11 @@ static void pandora_wl1251_init(void)
        if (pandora_wl1251_pdata.irq < 0)
                goto fail_irq;
 
+       pandora_wl1251_pdata.use_eeprom = true;
+       ret = wl12xx_set_platform_data(&pandora_wl1251_pdata);
+       if (ret < 0)
+               goto fail_irq;
+
        return;
 
 fail_irq:
@@ -690,7 +678,6 @@ static struct platform_device *omap3pandora_devices[] __initdata = {
        &pandora_leds_gpio,
        &pandora_keys_gpio,
        &pandora_dss_device,
-       &pandora_wl1251_data,
        &pandora_vwlan_device,
 };