Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314048
b: refs/heads/master
c: 197c628
h: refs/heads/master
v: v3
  • Loading branch information
Luciano Coelho committed Jun 5, 2012
1 parent 84e2dcb commit c920c5e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9a1a69901dae144ae160af5ac38848866d7c83b1
refs/heads/master: 197c62832b1a347f933fea286fc70266026ef5fb
15 changes: 14 additions & 1 deletion trunk/drivers/net/wireless/ti/wlcore/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <linux/module.h>
#include <linux/vmalloc.h>
#include <linux/platform_device.h>
#include <linux/mmc/sdio.h>
#include <linux/mmc/sdio_func.h>
#include <linux/mmc/sdio_ids.h>
#include <linux/mmc/card.h>
Expand Down Expand Up @@ -196,6 +197,7 @@ static int __devinit wl1271_probe(struct sdio_func *func,
struct resource res[1];
mmc_pm_flag_t mmcflags;
int ret = -ENOMEM;
const char *chip_family;

/* We are only able to handle the wlan function */
if (func->num != 0x02)
Expand Down Expand Up @@ -236,7 +238,18 @@ static int __devinit wl1271_probe(struct sdio_func *func,
/* Tell PM core that we don't need the card to be powered now */
pm_runtime_put_noidle(&func->dev);

glue->core = platform_device_alloc("wl12xx", -1);
/*
* Due to a hardware bug, we can't differentiate wl18xx from
* wl12xx, because both report the same device ID. The only
* way to differentiate is by checking the SDIO revision,
* which is 3.00 on the wl18xx chips.
*/
if (func->card->cccr.sdio_vsn == SDIO_SDIO_REV_3_00)
chip_family = "wl18xx";
else
chip_family = "wl12xx";

glue->core = platform_device_alloc(chip_family, -1);
if (!glue->core) {
dev_err(glue->dev, "can't allocate platform_device");
ret = -ENOMEM;
Expand Down

0 comments on commit c920c5e

Please sign in to comment.