diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-26 08:34:21 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-03-24 07:29:52 -0400 |
commit | 07be45f57ebe037977c8033a008e9012617b1915 (patch) | |
tree | a3b7f11eb00c78e5817c68412cad0e412a5c55db /arch/arm/common/sa1111.c | |
parent | e5c0fc4185c551c270868dcb6573604db2bc3171 (diff) |
ARM: sa1111: provide a generic way to prevent devices from registering
Some platforms don't want certain devices to be registered, because,
eg, the interface is not wired. Provide a way for platforms to
prevent various devices from being registered via a devid bitmask in
the platform data.
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/common/sa1111.c')
-rw-r--r-- | arch/arm/common/sa1111.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index 4bdf1bb283dc..17694cf64aa6 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c | |||
@@ -833,11 +833,8 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq) | |||
833 | g_sa1111 = sachip; | 833 | g_sa1111 = sachip; |
834 | 834 | ||
835 | has_devs = ~0; | 835 | has_devs = ~0; |
836 | if (machine_is_assabet() || machine_is_jornada720() || | 836 | if (pd) |
837 | machine_is_badge4()) | 837 | has_devs &= ~pd->disable_devs; |
838 | has_devs &= ~SA1111_DEVID_PS2_MSE; | ||
839 | else | ||
840 | has_devs &= ~SA1111_DEVID_SAC; | ||
841 | 838 | ||
842 | for (i = 0; i < ARRAY_SIZE(sa1111_devices); i++) | 839 | for (i = 0; i < ARRAY_SIZE(sa1111_devices); i++) |
843 | if (sa1111_devices[i].devid & has_devs) | 840 | if (sa1111_devices[i].devid & has_devs) |