瀏覽代碼

ARM: pxa/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 <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Dmitry Eremin-Solenikov 14 年之前
父節點
當前提交
8d9bd9002d
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      drivers/pcmcia/pxa2xx_colibri.c

+ 3 - 0
drivers/pcmcia/pxa2xx_colibri.c

@@ -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;