comedi: remove unnecessary module_init/exit functionsMany Comedi drivers have unnecessary empty module_init and module_exitfunctions. Remove them. Note that if a module_init function exists, amod
comedi: remove unnecessary module_init/exit functionsMany Comedi drivers have unnecessary empty module_init and module_exitfunctions. Remove them. Note that if a module_init function exists, amodule_exit function must also exist; otherwise, the module cannot beunloaded.Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>Reviewed-by: Ian Abbott <abboti@mev.co.uk>Link: https://patch.msgid.link/20260131013810.32265-1-enelsonmoore@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
comedi: kcomedilib: Add loop checking variants of open and closeAdd `comedi_open_from(path, from)` and `comedi_close_from(dev, from)` asvariants of the existing `comedi_from(path)` and `comedi_clo
comedi: kcomedilib: Add loop checking variants of open and closeAdd `comedi_open_from(path, from)` and `comedi_close_from(dev, from)` asvariants of the existing `comedi_from(path)` and `comedi_close(dev)`.The additional `from` parameter is a minor device number that tells thefunction that the COMEDI device is being opened or closed from anotherCOMEDI device if the value is in the range [0,`COMEDI_NUM_BOARD_MINORS`-1]. In that case the function will refuse toopen the device if it would lead to a chain of devices opening eachother. (It will also impose a limit on the number of simultaneous opensfrom one device to another because we need to count those.)The new functions are intended to be used by the "comedi_bond" driver,which is the only driver that uses the existing `comedi_open()` and`comedi_close()` functions. The new functions will be used to avoidsome possible deadlock situations.Replace the existing, exported `comedi_open()` and `comedi_close()`functions with inline wrapper functions that call the newly exported`comedi_open_from()` and `comedi_close_from()` functions.Signed-off-by: Ian Abbott <abbotti@mev.co.uk>Link: https://patch.msgid.link/20251027153748.4569-2-abbotti@mev.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
comedi: Move the main COMEDI headersMove the main COMEDI driver headers out of "drivers/comedi/" into newdirectory "include/linux/comedi/". These are "comedidev.h","comedilib.h", "comedi_pci.h",
comedi: Move the main COMEDI headersMove the main COMEDI driver headers out of "drivers/comedi/" into newdirectory "include/linux/comedi/". These are "comedidev.h","comedilib.h", "comedi_pci.h", "comedi_pcmcia.h", and "comedi_usb.h".Additionally, move the user-space API header "comedi.h" into"include/uapi/linux/" and add "WITH Linux-syscall-note" to itsSPDX-License-Identifier.Update the "COMEDI DRIVERS" section of the MAINTAINERS file to accountfor these changes.Signed-off-by: Ian Abbott <abbotti@mev.co.uk>Link: https://lore.kernel.org/r/20211117120604.117740-2-abbotti@mev.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: move out of staging directoryThe comedi code came into the kernel back in 2008, but traces itslifetime to much much earlier. It's been polished and buffed andthere's really noth
staging: comedi: move out of staging directoryThe comedi code came into the kernel back in 2008, but traces itslifetime to much much earlier. It's been polished and buffed andthere's really nothing preventing it from being part of the "real"portion of the kernel.So move it to drivers/comedi/ as it belongs there.Many thanks to the hundreds of developers who did the work to make thishappen.Cc: Ian Abbott <abbotti@mev.co.uk>Cc: H Hartley Sweeten <hsweeten@visionengravers.com>Link: https://lore.kernel.org/r/YHauop4u3sP6lz8j@kroah.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>