At Fri, 25 Apr 2008 11:17:52 +0200, Daniel Mack wrote: > > +int aic3x_get_gpio(struct snd_soc_codec *codec, int gpio) > +{ > + u8 reg = gpio ? AIC3X_GPIO2_REG : AIC3X_GPIO1_REG; > + u8 val, bit = gpio ? 2: 1; > + > + aic3x_read(codec, reg, &val); > + return !!(val & (1 << bit)); I prefer a form like return (val >> bit) & 1; "!!" often makes hard to read. Takashi _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel