aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-pxa/mfp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-pxa/mfp.c')
-rw-r--r--arch/arm/plat-pxa/mfp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/plat-pxa/mfp.c b/arch/arm/plat-pxa/mfp.c
index 9405d0379c85..be58f9fe65b0 100644
--- a/arch/arm/plat-pxa/mfp.c
+++ b/arch/arm/plat-pxa/mfp.c
@@ -207,7 +207,7 @@ unsigned long mfp_read(int mfp)
207{ 207{
208 unsigned long val, flags; 208 unsigned long val, flags;
209 209
210 BUG_ON(mfp >= MFP_PIN_MAX); 210 BUG_ON(mfp < 0 || mfp >= MFP_PIN_MAX);
211 211
212 spin_lock_irqsave(&mfp_spin_lock, flags); 212 spin_lock_irqsave(&mfp_spin_lock, flags);
213 val = mfpr_readl(mfp_table[mfp].mfpr_off); 213 val = mfpr_readl(mfp_table[mfp].mfpr_off);
@@ -220,7 +220,7 @@ void mfp_write(int mfp, unsigned long val)
220{ 220{
221 unsigned long flags; 221 unsigned long flags;
222 222
223 BUG_ON(mfp >= MFP_PIN_MAX); 223 BUG_ON(mfp < 0 || mfp >= MFP_PIN_MAX);
224 224
225 spin_lock_irqsave(&mfp_spin_lock, flags); 225 spin_lock_irqsave(&mfp_spin_lock, flags);
226 mfpr_writel(mfp_table[mfp].mfpr_off, val); 226 mfpr_writel(mfp_table[mfp].mfpr_off, val);