aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/sgtl5000.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-10-20 06:49:29 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-10-21 04:56:06 -0400
commit064a4bcee4114e519ce22d56d2eb8e9dfa653804 (patch)
treee42e9a80d1ea248c03ad33b80f545460ccf0fdaa /sound/soc/codecs/sgtl5000.c
parent5b13de7aa754eaa274fc9ab018191bcdcb21bc45 (diff)
ASoC: Use SGTL5000_LINREG_VDDD_MASK instead of hardcoded mask value
We have defined SGTL5000_LINREG_VDDD_MASK in sgtl5000.h, use it instead of hardcoded (0x1 << 4) - 1 for the mask. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/sgtl5000.c')
-rw-r--r--sound/soc/codecs/sgtl5000.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 83950022b96e..32b5bbdae523 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -754,7 +754,7 @@ static int ldo_regulator_enable(struct regulator_dev *dev)
754 754
755 /* set voltage to register */ 755 /* set voltage to register */
756 snd_soc_update_bits(codec, SGTL5000_CHIP_LINREG_CTRL, 756 snd_soc_update_bits(codec, SGTL5000_CHIP_LINREG_CTRL,
757 (0x1 << 4) - 1, reg); 757 SGTL5000_LINREG_VDDD_MASK, reg);
758 758
759 snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_POWER, 759 snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_POWER,
760 SGTL5000_LINEREG_D_POWERUP, 760 SGTL5000_LINEREG_D_POWERUP,
@@ -780,7 +780,7 @@ static int ldo_regulator_disable(struct regulator_dev *dev)
780 780
781 /* clear voltage info */ 781 /* clear voltage info */
782 snd_soc_update_bits(codec, SGTL5000_CHIP_LINREG_CTRL, 782 snd_soc_update_bits(codec, SGTL5000_CHIP_LINREG_CTRL,
783 (0x1 << 4) - 1, 0); 783 SGTL5000_LINREG_VDDD_MASK, 0);
784 784
785 ldo->enabled = 0; 785 ldo->enabled = 0;
786 786
@@ -1115,7 +1115,7 @@ static int sgtl5000_set_power_regs(struct snd_soc_codec *codec)
1115 1115
1116 /* set voltage to register */ 1116 /* set voltage to register */
1117 snd_soc_update_bits(codec, SGTL5000_CHIP_LINREG_CTRL, 1117 snd_soc_update_bits(codec, SGTL5000_CHIP_LINREG_CTRL,
1118 (0x1 << 4) - 1, 0x8); 1118 SGTL5000_LINREG_VDDD_MASK, 0x8);
1119 1119
1120 /* 1120 /*
1121 * if vddd linear reg has been enabled, 1121 * if vddd linear reg has been enabled,