Thread (19 messages) 19 messages, 4 authors, 2011-02-15
STALE5628d

[PATCH 4/6] pcmcia: limit pxa2xx_balloon3 subdriver to balloon3 platform

From: Dmitry Eremin-Solenikov <hidden>
Date: 2011-01-05 02:05:08
Subsystem: pcmcia subsystem, pxa2xx/pxa3xx support, the rest · Maintainers: Dominik Brodowski, Daniel Mack, Haojian Zhuang, Robert Jarzmik, Linus Torvalds

pxa2xx_balloon3 tries to register pxa2xx-pcmcia device not checking whether
machine is really balloon3, thus messing multi-machine kernels. Fix it up.

Signed-off-by: Dmitry Eremin-Solenikov <redacted>
---
 drivers/pcmcia/pxa2xx_balloon3.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/pcmcia/pxa2xx_balloon3.c b/drivers/pcmcia/pxa2xx_balloon3.c
index dbbdd00..0b1caca 100644
--- a/drivers/pcmcia/pxa2xx_balloon3.c
+++ b/drivers/pcmcia/pxa2xx_balloon3.c
@@ -25,6 +25,8 @@
 
 #include <mach/balloon3.h>
 
+#include <asm/mach-types.h>
+
 #include "soc_common.h"
 
 /*
@@ -128,6 +130,9 @@ static int __init balloon3_pcmcia_init(void)
 {
 	int ret;
 
+	if (!machine_is_balloon3())
+		return -ENODEV;
+
 	balloon3_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
 	if (!balloon3_pcmcia_device)
 		return -ENOMEM;
-- 
1.7.2.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help