| .. | .. |
|---|
| 47 | 47 | #include<linux/of_gpio.h> |
|---|
| 48 | 48 | #endif /* CONFIG_DTS */ |
|---|
| 49 | 49 | |
|---|
| 50 | | -#if defined(CUSTOMER_HW) |
|---|
| 50 | +#if defined(CUSTOMER_HW) || defined(BCMDHD_PLATDEV) |
|---|
| 51 | 51 | extern int dhd_wlan_init_plat_data(wifi_adapter_info_t *adapter); |
|---|
| 52 | 52 | extern void dhd_wlan_deinit_plat_data(wifi_adapter_info_t *adapter); |
|---|
| 53 | 53 | #endif /* CUSTOMER_HW */ |
|---|
| .. | .. |
|---|
| 85 | 85 | #pragma GCC diagnostic ignored "-Wmissing-field-initializers" |
|---|
| 86 | 86 | #endif |
|---|
| 87 | 87 | struct resource dhd_wlan_resources = {0}; |
|---|
| 88 | | -struct wifi_platform_data dhd_wlan_control = {0}; |
|---|
| 88 | +extern struct wifi_platform_data dhd_wlan_control; |
|---|
| 89 | 89 | #if defined(STRICT_GCC_WARNINGS) && defined(__GNUC__) |
|---|
| 90 | 90 | #pragma GCC diagnostic pop |
|---|
| 91 | 91 | #endif |
|---|
| .. | .. |
|---|
| 378 | 378 | adapter->wifi_plat_data = (void *)&dhd_wlan_control; |
|---|
| 379 | 379 | #endif |
|---|
| 380 | 380 | |
|---|
| 381 | +#ifdef BCMDHD_PLATDEV |
|---|
| 382 | + adapter->pdev = pdev; |
|---|
| 383 | + wifi_plat_dev_probe_ret = dhd_wlan_init_plat_data(adapter); |
|---|
| 384 | + if (!wifi_plat_dev_probe_ret) |
|---|
| 385 | + wifi_plat_dev_probe_ret = dhd_wifi_platform_load(); |
|---|
| 386 | + return wifi_plat_dev_probe_ret; |
|---|
| 387 | +#endif |
|---|
| 388 | + |
|---|
| 381 | 389 | resource = platform_get_resource_byname(pdev, IORESOURCE_IRQ, "bcmdhd_wlan_irq"); |
|---|
| 382 | 390 | if (resource == NULL) |
|---|
| 383 | 391 | resource = platform_get_resource_byname(pdev, IORESOURCE_IRQ, "bcm4329_wlan_irq"); |
|---|
| .. | .. |
|---|
| 449 | 457 | #ifdef CONFIG_DTS |
|---|
| 450 | 458 | regulator_put(wifi_regulator); |
|---|
| 451 | 459 | #endif /* CONFIG_DTS */ |
|---|
| 460 | +#ifdef BCMDHD_PLATDEV |
|---|
| 461 | + dhd_wlan_deinit_plat_data(adapter); |
|---|
| 462 | +#endif |
|---|
| 452 | 463 | return 0; |
|---|
| 453 | 464 | } |
|---|
| 454 | 465 | |
|---|