On Tue, 2007-04-24 at 13:22 +0100, Christoph Hellwig wrote: > > +static void esp_build_sync_msg(struct esp *esp, u8 period, u8 > offset) > > { > > + esp->msg_out[0] = EXTENDED_MESSAGE; > > + esp->msg_out[1] = 3; > > + esp->msg_out[2] = EXTENDED_SDTR; > > + esp->msg_out[3] = period; > > + esp->msg_out[4] = offset; > > + esp->msg_out_len = 5; > > +} > > > > +static void esp_build_wide_msg(struct esp *esp, int wide) > > +{ > > + esp->msg_out[0] = EXTENDED_MESSAGE; > > + esp->msg_out[1] = 2; > > + esp->msg_out[2] = EXTENDED_WDTR; > > + esp->msg_out[3] = (wide ? 1 : 0); > > + esp->msg_out_len = 4; > > } > > These might actually be worth putting into the spi transport > class, taking an u8 * as first argument. After all all > SPI drivers without smart firmware will need them. This was going to be my comment ... they're already there: int spi_populate_width_msg(unsigned char *msg, int width); int spi_populate_sync_msg(unsigned char *msg, int period, int offset); int spi_populate_ppr_msg(unsigned char *msg, int period, int offset, int width, int options); James - To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html