From patchwork Fri May 13 21:26:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 784232 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4DLTDpG021401 for ; Fri, 13 May 2011 21:29:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759606Ab1EMV1f (ORCPT ); Fri, 13 May 2011 17:27:35 -0400 Received: from na3sys009aog112.obsmtp.com ([74.125.149.207]:51821 "EHLO na3sys009aog112.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759320Ab1EMV1d (ORCPT ); Fri, 13 May 2011 17:27:33 -0400 Received: from mail-fx0-f54.google.com ([209.85.161.54]) (using TLSv1) by na3sys009aob112.postini.com ([74.125.148.12]) with SMTP ID DSNKTc2iQ9LonvVUJ58dylc9bEtYmd1/eqC+@postini.com; Fri, 13 May 2011 14:27:32 PDT Received: by mail-fx0-f54.google.com with SMTP id 11so4204799fxm.27 for ; Fri, 13 May 2011 14:27:31 -0700 (PDT) Received: by 10.223.110.5 with SMTP id l5mr2302889fap.21.1305322051371; Fri, 13 May 2011 14:27:31 -0700 (PDT) Received: from localhost (cs181221225.pp.htv.fi [82.181.221.225]) by mx.google.com with ESMTPS id d18sm966579fak.22.2011.05.13.14.27.28 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 13 May 2011 14:27:30 -0700 (PDT) From: Felipe Balbi To: Luciano Coelho Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Felipe Balbi Subject: [RFC/PATCH 10/13] net: wl12xx: main: add platform device Date: Sat, 14 May 2011 00:26:27 +0300 Message-Id: <1305321990-22041-11-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.7.4.1.343.ga91df In-Reply-To: <1305321990-22041-1-git-send-email-balbi@ti.com> References: <1305321990-22041-1-git-send-email-balbi@ti.com> Organization: Texas Instruments\n Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 13 May 2011 21:29:14 +0000 (UTC) now that we have a platform_driver on both glue layers, add a platform_device to the core driver. It's currently an empty platform_driver but more functionality will be added on later patches. Signed-off-by: Felipe Balbi --- drivers/net/wireless/wl12xx/main.c | 35 +++++++++++++++++++++++++++++++++++ 1 files changed, 35 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 8b3c8d1..d377e1f 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c @@ -3547,6 +3547,41 @@ int wl1271_free_hw(struct wl1271 *wl) } EXPORT_SYMBOL_GPL(wl1271_free_hw); +static int __devinit wl12xx_probe(struct platform_device *pdev) +{ + return 0; +} + +static int __devexit wl12xx_remove(struct platform_device *pdev) +{ + return 0; +} + +static const struct platform_device_id wl12xx_id_table[] __devinitconst = { + { "wl12xx-sdio", 0 }, + { "wl12xx-spi", 0 }, + { } /* Terminating Entry */ +}; +MODULE_DEVICE_TABLE(platform, wl12xx_id_table); + +static struct platform_driver wl12xx_driver = { + .probe = wl12xx_probe, + .remove = __devexit_p(wl12xx_remove), + .id_table = wl12xx_id_table, +}; + +static int __init wl12xx_init(void) +{ + return platform_driver_register(&wl12xx_driver); +} +module_init(wl12xx_init); + +static void __exit wl12xx_exit(void) +{ + platform_driver_unregister(&wl12xx_driver); +} +module_exit(wl12xx_exit); + u32 wl12xx_debug_level = DEBUG_NONE; EXPORT_SYMBOL_GPL(wl12xx_debug_level); module_param_named(debug_level, wl12xx_debug_level, uint, S_IRUSR | S_IWUSR);