public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OLPC: register XO-1 RF kill device
@ 2010-10-04 17:14 Daniel Drake
  2010-10-04 17:43 ` H. Peter Anvin
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Drake @ 2010-10-04 17:14 UTC (permalink / raw)
  To: tglx, mingo, hpa, x86; +Cc: mjg, linux-kernel, dilinger

The upcoming XO-1 rfkill driver (for drivers/platform/x86) will register
itself with the name "xo1-rfkill"

Add the necessary mechanics so that this is properly probed and
initialized on XO-1 laptops.

Signed-off-by: Daniel Drake <dsd@laptop.org>
---
 arch/x86/kernel/olpc.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/olpc.c b/arch/x86/kernel/olpc.c
index 37c49934..d57f26a 100644
--- a/arch/x86/kernel/olpc.c
+++ b/arch/x86/kernel/olpc.c
@@ -17,6 +17,7 @@
 #include <linux/spinlock.h>
 #include <linux/io.h>
 #include <linux/string.h>
+#include <linux/platform_device.h>
 
 #include <asm/geode.h>
 #include <asm/setup.h>
@@ -248,6 +249,15 @@ static int __init olpc_init(void)
 			olpc_platform_info.boardrev >> 4,
 			olpc_platform_info.ecver);
 
+	if (olpc_platform_info.boardrev < olpc_board_pre(0xd0)) { /* XO-1 */
+		struct platform_device *pdev;
+
+		/* register any relevant platform devices */
+		pdev = platform_device_register_simple("xo1-rfkill", -1, NULL, 0);
+		if (IS_ERR(pdev))
+			return PTR_ERR(pdev);
+	}
+
 	return 0;
 }
 
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-10-04 17:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-04 17:14 [PATCH] OLPC: register XO-1 RF kill device Daniel Drake
2010-10-04 17:43 ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox