[ARM] pxa: avoid registering multiple pxa2xx_pcmcia devices
cm_x270 and mainstone both register their PCMCIA devices using the same name, resulting in a warning message from the kernel. Avoid this by making the cm_x270 and mainstone PCMCIA initialisation conditional on the machine type we're running on. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
720046de27
commit
04ba0f656f
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
#include <pcmcia/ss.h>
|
#include <pcmcia/ss.h>
|
||||||
#include <asm/hardware.h>
|
#include <asm/hardware.h>
|
||||||
|
#include <asm/mach-types.h>
|
||||||
|
|
||||||
#include <asm/arch/pxa-regs.h>
|
#include <asm/arch/pxa-regs.h>
|
||||||
#include <asm/arch/pxa2xx-gpio.h>
|
#include <asm/arch/pxa2xx-gpio.h>
|
||||||
|
@ -147,6 +148,9 @@ static int __init cmx270_pcmcia_init(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (!machine_is_armcore())
|
||||||
|
return -ENODEV;
|
||||||
|
|
||||||
cmx270_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
|
cmx270_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
|
||||||
|
|
||||||
if (!cmx270_pcmcia_device)
|
if (!cmx270_pcmcia_device)
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#include <pcmcia/ss.h>
|
#include <pcmcia/ss.h>
|
||||||
|
|
||||||
#include <asm/hardware.h>
|
#include <asm/hardware.h>
|
||||||
|
#include <asm/mach-types.h>
|
||||||
#include <asm/irq.h>
|
#include <asm/irq.h>
|
||||||
|
|
||||||
#include <asm/arch/pxa-regs.h>
|
#include <asm/arch/pxa-regs.h>
|
||||||
|
@ -153,6 +154,9 @@ static int __init mst_pcmcia_init(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (!machine_is_mainstone())
|
||||||
|
return -ENODEV;
|
||||||
|
|
||||||
mst_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
|
mst_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
|
||||||
if (!mst_pcmcia_device)
|
if (!mst_pcmcia_device)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
Loading…
Reference in a new issue