[lkml]   [2015]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v3] serial: 8250: add gpio support to exar
> > If you are linking it into the driver you don't need the module_init/exit
> > gpio_init/exit methods. Your Kconfig becomes a bool and you combine the
> > file into the driver based upon that bool.
> But isn't it better to have the gpio code separete from the 8250 code?
> But how do i combine a file? is it like:
> #ifdef SERIAL_8250_EXAR_GPIO
> #include "8250_gpio.c"
> #endif
> or should it be:
> #ifdef SERIAL_8250_EXAR_GPIO
> all c code
> #endif

Neither of the above. Take a look how other parts of the kernel combine
multiple files into a single module. It's supported by the
Kconfig/Makefile system, and they will get linked together as a single
binary while being separate sources.

For an example look at drivers/tty/ipwireless


 \ /
  Last update: 2015-12-20 19:01    [W:0.043 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site