Hi Hans, On Fri, Mar 10, 2017 at 12:25:54PM +0100, Hans Verkuil wrote: > Slight problem with this. If I make this change, then the of_node_put below > changes as well: > > @@ -1193,7 +1176,7 @@ static int isi_graph_init(struct atmel_isi *isi) > done: > if (ret < 0) { > v4l2_async_notifier_unregister(&isi->notifier); > - of_node_put(isi->entity.node); > + of_node_put(isi->entity.asd.match.of.node); > } > > And I get this compiler warning: > > CC [M] drivers/media/platform/atmel/atmel-isi.o > drivers/media/platform/atmel/atmel-isi.c: In function ‘isi_graph_init’: > drivers/media/platform/atmel/atmel-isi.c:1179:15: warning: passing argument 1 of ‘of_node_put’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] > of_node_put(isi->entity.asd.match.of.node); > ^~~ > In file included from drivers/media/platform/atmel/atmel-isi.c:25:0: > ./include/linux/of.h:130:20: note: expected ‘struct device_node *’ but argument is of type ‘const struct device_node *’ > static inline void of_node_put(struct device_node *node) { } > ^~~~~~~~~~~ > > > Any suggestions? Just keep the entity.node after all? Yeah, makes sense, I didn't come to think of that. -- Regards, Sakari Ailus e-mail: sakari.ailus@xxxxxx XMPP: sailus@xxxxxxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html