Skip to contentSkip to conversation

regulator: lp8788-ldo: Remove val array in lp8788_config_ldo_enable_mode

PATCH Applied Axel Lin 3 participants 3 messages Dec 7, 2012 Voltage and current regulator framework

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 regulator: lp8788-ldo: Remove val array in lp8788_config_ldo_enable_mode

To clear the mask bit, setting data argument to be 0 with proper mask setting for lp8788_update_bits. We don't need the var array here.

---
 drivers/regulator/lp8788-ldo.c |   11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
drivers/regulator/lp8788-ldo.c +1 -10
index 9c1c253..3792741 100644
@@ -662,14 +662,6 @@ static int lp8788_config_ldo_enable_mode(struct lp8788_ldo *ldo,
 		[EN_DLDO7]   = LP8788_EN_SEL_DLDO7_M,
 		[EN_DLDO911] = LP8788_EN_SEL_DLDO911_M,
 	};
-	u8 val[] = {
-		[EN_ALDO1]   = 0 << 5,
-		[EN_ALDO234] = 0 << 4,
-		[EN_ALDO5]   = 0 << 3,
-		[EN_ALDO7]   = 0 << 2,
-		[EN_DLDO7]   = 0 << 1,
-		[EN_DLDO911] = 0 << 0,
-	};
 
 	switch (id) {
 	case DLDO7:
@@ -708,8 +700,7 @@ static int lp8788_config_ldo_enable_mode(struct lp8788_ldo *ldo,
 	return ret;
 
 set_default_ldo_enable_mode:
-	return lp8788_update_bits(lp, LP8788_EN_SEL, en_mask[enable_id],
-				val[enable_id]);
+	return lp8788_update_bits(lp, LP8788_EN_SEL, en_mask[enable_id], 0);
 }
 
 static int lp8788_dldo_probe(struct platform_device *pdev)
Signature · 1 line
1.7.9.5
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines

To clear the mask bit, setting data argument to be 0 with proper mask setting
for lp8788_update_bits. We don't need the var array here.

Thanks!

���{.n�+�������+%�����ݶ��w��{.n�+����{��G�����{ay�ʇڙ�,j��f���h��������z_�(�階�ݢj"���m������G������?����&���~��iO��z��v�^�m���� ������?�I�

Applied
#2 lore raw
In reply to Axel Lin
Quoted 2 lines · Axel Lin

To clear the mask bit, setting data argument to be 0 with proper mask setting for lp8788_update_bits. We don't need the var array here.

Applied, thanks.