int hermes_bap_pwrite_pad(hermes_t *hw, int bap, const void *buf, unsigned data_len, unsigned len, 
int hermes_bap_pwrite_pad(hermes_t *hw, int bap, const void *buf, unsigned data_len, int len, 
int hermes_bap_pwrite_pad(hermes_t *hw, int bap, const void *buf, unsigned data_len, unsigned len,		      u16 id, u16 offset){	int dreg = bap ? HERMES_DATA1 : HERMES_DATA0;	int err = 0;	if (len < 0 || len % 2 || data_len > len)		return -EINVAL;	err = hermes_bap_seek(hw, bap, id, offset);	if (err)		goto out;	/* Transfer all the complete words of data */	hermes_write_words(hw, dreg, buf, data_len/2);	/* If there is an odd byte left over pad and transfer it */	if (data_len & 1) {		u8 end[2];		end[1] = 0;		end[0] = ((unsigned char *)buf)[data_len - 1];		hermes_write_words(hw, dreg, end, 1);		data_len ++;	}	/* Now send zeros for the padding */	if (data_len < len)		hermes_clear_words(hw, dreg, (len - data_len) / 2);	/* Complete */ out:	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/c5b42f343d19d0a04782db0dde5b128dd282f95c/hermes.c/buggy/drivers/net/wireless/hermes.c