]> git.karo-electronics.de Git - linux-beck.git/commitdiff
wlcore: use PLATFORM_DEVID_AUTO for plat dev creation to avoid conflicts
authorLuciano Coelho <coelho@ti.com>
Wed, 23 Jan 2013 14:40:37 +0000 (16:40 +0200)
committerLuciano Coelho <coelho@ti.com>
Fri, 8 Feb 2013 08:05:02 +0000 (10:05 +0200)
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>
drivers/net/wireless/ti/wlcore/sdio.c
drivers/net/wireless/ti/wlcore/spi.c

index 6d2884f040c74e0c510548c939c321b2646dbcdd..198028df6f4b98bb4514f667daec3ba3fe520065 100644 (file)
@@ -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;
index d62a20b99190640fdba12ede85362f3016a70606..5ad2e100e59b1b650be4b1502da43e5b5995575d 100644 (file)
@@ -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;