On Sunday 18 March 2012, Arnd Bergmann wrote:
> > 
> > Is dma_find_device() a new function?  How does it look up the dma
> > device?
> 
> Yes, it would be similar to the proposed function in Benoit's patch
> 

Well, actually we would not even need a new list with all the devices,
it can simply become

/* must be called with dma_list_mutex held */
static struct dma_device *dma_find_device(struct of_node *node)
{
        struct dma_device *device;
        
        list_for_each_entry(device, &dma_device_list, global_node) {
                if (device->dev.of_node == node)
                        break;
        }
        return device;
}

Given that dma_device_list is most likely be a very short list, this will
be a fast operation.

        Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to