Skip to content

Commit

Permalink
ASoC: adau1977: Fix truncation warning on 64 bit architectures
Browse files Browse the repository at this point in the history
Negating ADAU1977_BLOCK_POWER_SAI_LDO_EN creates an unsigned long constant
with all bits set which on 64 bit architectures needs to be truncated to
an unsigned int, generating a warning. Add an explicit cast since we know
this is OK.

Signed-off-by: Mark Brown <[email protected]>
Acked-by: Lars-Peter Clausen <[email protected]>
  • Loading branch information
broonie committed Aug 4, 2014
1 parent 7171511 commit d8df26b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/codecs/adau1977.c
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ int adau1977_probe(struct device *dev, struct regmap *regmap,
if (adau1977->dvdd_reg)
power_off_mask = ~0;
else
power_off_mask = ~ADAU1977_BLOCK_POWER_SAI_LDO_EN;
power_off_mask = (unsigned int)~ADAU1977_BLOCK_POWER_SAI_LDO_EN;

ret = regmap_update_bits(adau1977->regmap, ADAU1977_REG_BLOCK_POWER_SAI,
power_off_mask, 0x00);
Expand Down

0 comments on commit d8df26b

Please sign in to comment.