On 12.06.19 14:32, Enrico Weigelt, metux IT consult wrote: > > IMHO, we should introduce a macro for that, similar to > module_i2c_driver()+friends. ups, we already have one for this case: module_platform_driver() - defined in include/linux/platform_device.h The logic is: just leave off the gpio_inverter_init() and gpio_inverter_exit() functions and instead call the macro: module_platform_driver(gpio_inverter_driver); This macro call automatically defines the init/exit boilerplate, so you don't need to write it on your own anymore. --mtx -- Enrico Weigelt, metux IT consult Free software and Linux embedded engineering info@xxxxxxxxx -- +49-151-27565287