colibri : don't register pxa2xx-pcmcia nodes on non-colibri platforms
Subsystems (2)
PATCH 1/1 colibri : don't register pxa2xx-pcmcia nodes on non-colibri platforms
PXA supports multi-machine kernels since long ago. However a kernel compiled with support for colibri and any other PXA machine and with PCMCIA enabled will barf at runtime about duplicate registration of pxa2xx-pcmcia device. Fix that.
Signed-off-by Dmitry Eremin-Solenikov <[email protected]>
--- drivers/pcmcia/pxa2xx_colibri.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/pcmcia/pxa2xx_colibri.c +3 -0
@@ -181,6 +181,9 @@ static int __init colibri_pcmcia_init(void) {int ret; +if (!machine_is_colibri () && !machine_is_colibri320 ()) +return -ENODEV ; + colibri_pcmcia_device =platform_device_alloc ("pxa2xx-pcmcia" ,-1 );if (!colibri_pcmcia_device)return -ENOMEM ;
Signature · 1 line
1.7.2.3
Eric Miao
AppliedPATCH 1/1 colibri : don't register pxa2xx-pcmcia nodes on non-colibri platforms
Quoted 6 lines · Dmitry Eremin-Solenikov
PXA supports multi-machine kernels since long ago. However a kernel compiled with support for colibri and any other PXA machine and with PCMCIA enabled will barf at runtime about duplicate registration of pxa2xx-pcmcia device. Fix that.
Signed-off-by Dmitry Eremin-Solenikov <[email protected]>
Applied to 'fix'.
Quoted 22 lines
---
?drivers/pcmcia/pxa2xx_colibri.c | ? ?3 +++
?1 files changed, 3 insertions(+), 0 deletions(-)drivers/pcmcia/pxa2xx_colibri.c +3
-1@@ -181,6 +181,9 @@ static int __init colibri_pcmcia_init(void) ?{ ? ? ? ?int ret; + ? ? ? if (!machine_is_colibri() && !machine_is_colibri320()) + ? ? ? ? ? ? ? return -ENODEV; + ? ? ? ?colibri_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1); ? ? ? ?if (!colibri_pcmcia_device) ? ? ? ? ? ? ? ?return -ENOMEM; --1.7.2.3