[alsa-devel] [PATCH 5/7] ASoC: wm5100: remove bitwise operations involving GPIO level value
Mark Brown
broonie at kernel.org
Tue Jun 2 21:45:58 CEST 2015
On Tue, Jun 02, 2015 at 02:09:16AM +0300, Vladimir Zapolskiy wrote:
> @@ -2244,26 +2244,27 @@ static inline struct wm5100_priv *gpio_to_wm5100(struct gpio_chip *chip)
> static void wm5100_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
> {
> struct wm5100_priv *wm5100 = gpio_to_wm5100(chip);
> + unsigned int val = 0;
> +
> + if (value)
> + val = 0x1 << WM5100_GP1_LVL_SHIFT;
Write this as an if/else so the reader doesn't have to wonder why you've
missed the handling of the false case.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150602/c28f4074/attachment.sig>
More information about the Alsa-devel
mailing list