As I just said to Wout, POGO is generating code which will invoke init_device() from the constructor.
So, yes, init_device() is supposed to be invoked from the constructor.
If one would strictly follow C++ principles then init_device must not be called from a constructor.
The reason simply being the fact that a C++ object does not exist until its constructor has finished successfully. From C++'s perspective init_device is a call on a C++ object and hence should not be called from the constructor.
That Pogo calls init_device can be justified if the functionality implemented in init_device is simple and does not require the object. Everything that is done in init_device that expects the object to exist will fail.
@tjuerges I agree with you. I think init_device() was created to intialise the device once the object existed and could assume it could use the Device object fully. Typical initialisation involved communication with hardware etc. I wonder why pogo then calls it from inside the constructor and if it has always been like this. It could be useful for the kernel experts to provide some guidelines on the correct use of dev_init().