Re: [PATCH V1 1/2] gpio: inverter: Add virtual controller for gpio configuration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux