Thread (3 messages) flat view 3 messages, 2 authors, 2007-01-18

Re: [PATCH 17/19] powerpc: hypervisor console driver for Celleb

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2007-01-18 00:39:40

+/* temp */
+static int hvc_beat_init(void)
+{
+	struct hvc_struct *hp;
+
+	hp = hvc_alloc(0, NO_IRQ, &hvc_beat_get_put_ops, 16);
+	if (IS_ERR(hp))
+		return PTR_ERR(hp);
+	hvc_beat_dev = hp;
+	return 0;
+}
Please test your are running on beat before initializing your stuff as
your driver might be built as part of a kernel that can boot other
machines. 
+static void __exit hvc_beat_exit(void)
+{
+	if (hvc_beat_dev)
+		hvc_remove(hvc_beat_dev);
+}
+
+module_init(hvc_beat_init);
+module_exit(hvc_beat_exit);
+
+__setup("hvc_beat=", hvc_beat_config);
+
+console_initcall(hvc_beat_console_init);
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help