Am Montag, 16. Januar 2012, 14:02:05 schrieb Hans Verkuil: > > > +/* Set frequency (if non-0), PA, mute and turn on/off the FM > > > transmitter. */ +static int keene_cmd_main(struct keene_device *radio, > > > unsigned freq, bool play) +{ > > > + unsigned short freq_send = freq ? (freq - 76 * 16000) / 800 : 0; > > > + int ret; > > > + > > > + radio->buffer[0] = 0x00; > > > + radio->buffer[1] = 0x50; > > > + radio->buffer[2] = (freq_send >> 8) & 0xff; > > > + radio->buffer[3] = freq_send & 0xff; > > > > Please use the endianness macro appropriate here > > I don't see any endianness issues here, but perhaps I missed something. You are doing the endianness conversion by hand. We have a nice macro for that that assures that special swapping cpu instructions will be used. Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html