Have to admit I am pretty tired so might not be thinking straight,
but...
025 struct dma_info *get_dma_info(unsigned int chan)
026 {
027 struct dma_info *info;
028
029 /*
030 * Look for each DMAC's range to determine who the owner of
031 * the channel is.
032 */
033 list_for_each_entry(info, ®istered_dmac_list, list) {
034 if ((chan < info->first_channel_nr) ||
035 (chan >= info->first_channel_nr + info->nr_channels))
036 continue;
037
038 return info;
039 }
040
041 return NULL;
042 }
To me the above looks like it has mixed up channels and virtual channels - eg when called with chan = 4 (for pvr2) it ought to return NULL
Is that right?
|