Linux wireless drivers development
 help / color / mirror / Atom feed
From: Luciano Coelho <coelho@ti.com>
To: coelho@ti.com
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 5/8] wl12xx: add platform driver to the core module
Date: Thu,  6 Oct 2011 22:10:56 +0300	[thread overview]
Message-ID: <1317928259-26437-6-git-send-email-coelho@ti.com> (raw)
In-Reply-To: <1317928259-26437-1-git-send-email-coelho@ti.com>

From: Felipe Balbi <balbi@ti.com>

Nnow that we have a platform_device on both glue layers, add a
platform_driver 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 <balbi@ti.com>
[forward-ported, cleaned-up and rephrased commit message]
[added platform_driver.driver initialization]
Signed-off-by: Luciano Coelho <coelho@ti.com>
---
 drivers/net/wireless/wl12xx/main.c |   39 ++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 194d7cc..84904bd 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -5041,6 +5041,45 @@ 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,
+	.driver = {
+		.name	= "wl12xx",
+		.owner	= THIS_MODULE,
+	}
+};
+
+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);
-- 
1.7.1


  parent reply	other threads:[~2011-10-06 19:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-06 19:10 [PATCH 0/8] wl12xx: forward ported Balbi's bus driver refactor Luciano Coelho
2011-10-06 19:10 ` [PATCH 1/8] wl12xx: add an sdio glue struct to keep wl and device side-by-side Luciano Coelho
2011-10-06 19:10 ` [PATCH 2/8] wl12xx: add an spi " Luciano Coelho
2011-10-06 19:10 ` [PATCH 3/8] wl12xx: add a platform device to the sdio module Luciano Coelho
2011-10-06 19:10 ` [PATCH 4/8] wl12xx: add a platform device to the spi module Luciano Coelho
2011-10-06 19:10 ` Luciano Coelho [this message]
2011-10-06 19:10 ` [PATCH 6/8] wl12xx: move common init code from bus modules to main Luciano Coelho
2011-10-06 19:10 ` [PATCH 7/8] wl12xx: mark some symbols static Luciano Coelho
2011-10-06 19:10 ` [PATCH 8/8] wl12xx: drop unneeded plat_dev Luciano Coelho
2011-10-11 13:05 ` [PATCH 0/8] wl12xx: forward ported Balbi's bus driver refactor Luciano Coelho

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1317928259-26437-6-git-send-email-coelho@ti.com \
    --to=coelho@ti.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox