Skip to content

Commit

Permalink
wlcore: use PLATFORM_DEVID_AUTO for plat dev creation to avoid conflicts
Browse files Browse the repository at this point in the history
The platform devices can be created by both wlcore_sdio and
wlcore_spi.  Theoretically, if both are connected to the same board,
there will be a conflict.

Reported-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
  • Loading branch information
Luciano Coelho committed Feb 8, 2013
1 parent 91147a6 commit 06ab405
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wlcore/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ static int wl1271_probe(struct sdio_func *func,
else
chip_family = "wl12xx";

glue->core = platform_device_alloc(chip_family, -1);
glue->core = platform_device_alloc(chip_family, PLATFORM_DEVID_AUTO);
if (!glue->core) {
dev_err(glue->dev, "can't allocate platform_device");
ret = -ENOMEM;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wlcore/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ static int wl1271_probe(struct spi_device *spi)
goto out_free_glue;
}

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

0 comments on commit 06ab405

Please sign in to comment.