/* omap_modify_dma_chain_param : Modify the chain's params - Modify the params after setting it. Dont do this while dma is running!!  */
int omap_modify_dma_chain_params(int chain_id, struct omap_dma_channel_params params)
/* omap_modify_dma_chain_param : Modify the chain's params - Modify the params after setting it. Dont do this while dma is running!!  */
int omap_modify_dma_chain_params(int chain_id, struct omap_dma_channel_params params)
{
	int *channels;
	u32 i;
	if (unlikely((chain_id < 0
			|| chain_id >= dma_lch_count))) {
		printk(KERN_ERR "Invalid chain id\n");
		return -EINVAL;
	}
	if (dma_linked_lch[chain_id].linked_dmach_q == NULL) {
		printk(KERN_ERR "Chain doesn't exists\n");
		return -EINVAL;
	}
	channels = dma_linked_lch[chain_id].linked_dmach_q;
	for (i = 0; i < dma_linked_lch[chain_id].no_of_lchs_linked; i++) {
		omap_set_dma_params(channels[i], &params);
	}
	return 0;
}