void *data);
extern void of_dma_controller_free(struct device_node *np);
+static void __of_dma_controller_free(void *np)
+{
+ of_dma_controller_free(np);
+}
+
+static inline int
+devm_of_dma_controller_register(struct device *dev, struct device_node *np,
+ struct dma_chan *(*of_dma_xlate)
+ (struct of_phandle_args *, struct of_dma *),
+ void *data)
+{
+ int ret;
+
+ ret = of_dma_controller_register(np, of_dma_xlate, data);
+ if (ret)
+ return ret;
+
+ return devm_add_action_or_reset(dev, __of_dma_controller_free, np);
+}
+
extern int of_dma_router_register(struct device_node *np,
void *(*of_dma_route_allocate)
(struct of_phandle_args *, struct of_dma *),
{
}
+static inline int
+devm_of_dma_controller_register(struct device *dev, struct device_node *np,
+ struct dma_chan *(*of_dma_xlate)
+ (struct of_phandle_args *, struct of_dma *),
+ void *data)
+{
+ return -ENODEV;
+}
+
static inline int of_dma_router_register(struct device_node *np,
void *(*of_dma_route_allocate)
(struct of_phandle_args *, struct of_dma *),