From patchwork Wed Jan 23 14:40:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luciano Coelho X-Patchwork-Id: 2025181 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 0CF3D3FD86 for ; Wed, 23 Jan 2013 14:41:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755887Ab3AWOll (ORCPT ); Wed, 23 Jan 2013 09:41:41 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:51997 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755248Ab3AWOli (ORCPT ); Wed, 23 Jan 2013 09:41:38 -0500 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id r0NEfbOB018117 for ; Wed, 23 Jan 2013 08:41:37 -0600 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r0NEfbZt025993 for ; Wed, 23 Jan 2013 08:41:37 -0600 Received: from dlelxv22.itg.ti.com (172.17.1.197) by dfle73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.1.323.3; Wed, 23 Jan 2013 08:41:37 -0600 Received: from cumari.coelho.fi (h79-17.vpn.ti.com [172.24.79.17]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r0NEfUXg013595; Wed, 23 Jan 2013 08:41:35 -0600 From: Luciano Coelho To: CC: Subject: [PATCH 4/5] wlcore: use PLATFORM_DEVID_AUTO for plat dev creation to avoid conflicts Date: Wed, 23 Jan 2013 16:40:37 +0200 Message-ID: <1358952038-5982-5-git-send-email-coelho@ti.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1358952038-5982-1-git-send-email-coelho@ti.com> References: <1358952038-5982-1-git-send-email-coelho@ti.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 Signed-off-by: Luciano Coelho --- drivers/net/wireless/ti/wlcore/sdio.c | 2 +- drivers/net/wireless/ti/wlcore/spi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c index 6d2884f..198028d 100644 --- a/drivers/net/wireless/ti/wlcore/sdio.c +++ b/drivers/net/wireless/ti/wlcore/sdio.c @@ -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; diff --git a/drivers/net/wireless/ti/wlcore/spi.c b/drivers/net/wireless/ti/wlcore/spi.c index d62a20b..5ad2e10 100644 --- a/drivers/net/wireless/ti/wlcore/spi.c +++ b/drivers/net/wireless/ti/wlcore/spi.c @@ -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;