]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: ab8500: Fix invalid cast to long pointer
authorTakashi Iwai <tiwai@suse.de>
Wed, 30 Oct 2013 07:35:01 +0000 (08:35 +0100)
committerMark Brown <broonie@linaro.org>
Wed, 30 Oct 2013 16:33:30 +0000 (09:33 -0700)
commit01f0949806939e3c845787e01356dc2d1099addf
tree84da6b53d0d952949de3dfcc12bfb56b0820c25c
parentb19f9a74ea44b4e1bfefbecdf645209a8c23ed8b
ASoC: ab8500: Fix invalid cast to long pointer

Don't cast to long pointers blindly just for using find_first_bit()
and co.  This is certainly not portable at all.

Reimplement the code with ffs() and fls() instead.  This is a slight
optimization, too.

Spotted by coverity CID 1056484 and 1056485.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/codecs/ab8500-codec.c