Skip to contentSkip to conversation

pcmcia: limit pxa2xx_balloon3 subdriver to balloon3 platform

PATCH New Dmitry Eremin-Solenikov 2 participants 4 messages Apr 1, 2011 – Apr 4, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 pcmcia: limit pxa2xx_balloon3 subdriver to balloon3 platform

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

---
 drivers/pcmcia/pxa2xx_balloon3.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/pcmcia/pxa2xx_balloon3.c +5 -0
index 453c54c..4c3e94c 100644
@@ -25,6 +25,8 @@
 
 #include <mach/balloon3.h>
 
+#include <asm/mach-types.h>
+
 #include "soc_common.h"
 
 /*
@@ -127,6 +129,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;
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 2/2 pcmcia: limit pxa2xx_trizeps4 subdriver to trizeps4 platform

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

---
 drivers/pcmcia/pxa2xx_trizeps4.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/pcmcia/pxa2xx_trizeps4.c +3 -0
index b7e5966..5bb4e1a 100644
@@ -226,6 +226,9 @@ static int __init trizeps_pcmcia_init(void)
 {
 	int ret;
 
+	if (!machine_is_trizeps4() && !machine_is_trizeps4wl())
+		return -ENODEV;
+
 	trizeps_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
 	if (!trizeps_pcmcia_device)
 		return -ENOMEM;
Signature · 1 line
1.7.4.1
Applied
#2 lore raw

PATCH 2/2 pcmcia: limit pxa2xx_trizeps4 subdriver to trizeps4 platform

Quoted 4 lines · Dmitry Eremin-Solenikov

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

Applied.

Quoted 22 lines

---
?drivers/pcmcia/pxa2xx_trizeps4.c | ? ?3 +++
?1 files changed, 3 insertions(+), 0 deletions(-)

drivers/pcmcia/pxa2xx_trizeps4.c +3 -1
index b7e5966..5bb4e1a 100644
@@ -226,6 +226,9 @@ static int __init trizeps_pcmcia_init(void)
 ?{
 ? ? ? ?int ret;
 
+ ? ? ? if (!machine_is_trizeps4() && !machine_is_trizeps4wl())
+ ? ? ? ? ? ? ? return -ENODEV;
+
 ? ? ? ?trizeps_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
 ? ? ? ?if (!trizeps_pcmcia_device)
 ? ? ? ? ? ? ? ?return -ENOMEM;
--

1.7.4.1

Applied
#3 lore raw

PATCH 1/2 pcmcia: limit pxa2xx_balloon3 subdriver to balloon3 platform

In reply to Dmitry Eremin-Solenikov
Quoted 4 lines · Dmitry Eremin-Solenikov

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

Applied.

Quoted 31 lines

---
?drivers/pcmcia/pxa2xx_balloon3.c | ? ?5 +++++
?1 files changed, 5 insertions(+), 0 deletions(-)

drivers/pcmcia/pxa2xx_balloon3.c +0 -0
index 453c54c..4c3e94c 100644
@@ -25,6 +25,8 @@
 

?#include <mach/balloon3.h>

drivers/pcmcia/pxa2xx_balloon3.c +2 -0
+#include <asm/mach-types.h>
+

?#include "soc_common.h"

?/*

drivers/pcmcia/pxa2xx_balloon3.c +3 -1
@@ -127,6 +129,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.4.1