From a177f77a86c59d2483d92dca7752d3fa3a18351b Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Thu, 9 Oct 2008 12:51:39 +0000 Subject: [PATCH] Updated the "Adding new drivers" section due to optional PCI support. --- Documentation/comedi/Hardware_Driver.HOWTO | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Documentation/comedi/Hardware_Driver.HOWTO b/Documentation/comedi/Hardware_Driver.HOWTO index 5d18035e..bc34037a 100644 --- a/Documentation/comedi/Hardware_Driver.HOWTO +++ b/Documentation/comedi/Hardware_Driver.HOWTO @@ -73,11 +73,13 @@ drivers in the comedi source tree the following things have to be done: - Put your new driver into 'comedi/drivers/mydriver.c'. - Edit 'comedi/drivers/Makefile.am' and update 'module_PROGRAMS', - 'pcmcia_modules', or 'usb_modules', depending on the type of driver. - Add a 'mydriver_KO_sources' macro set to your 'mydriver.c' file (look - at the other examples). If your driver has its own include files, add - them to the EXTRA_DIST macro. + 'pci_modules2', 'pcmcia_modules', or 'usb_modules', depending on the type + of driver. (There is also a 'pci_modules1' used by a few helper modules.) + Add a 'mydriver_ko_sources' macro set to your 'mydriver.c' file (look at + the other examples). If your driver has its own include files, add them + to the EXTRA_DIST macro. - Edit 'comedi/drivers/Kbuild' and add a 'obj-m += mydriver.o', + 'obj-$(COMEDI_CONFIG_PCI_MODULES) += mydriver.o', 'obj-$(COMEDI_CONFIG_PCMCIA_MODULES) += mydriver.o', or 'obj-$(COMEDI_CONFIG_USB_MODULES) += mydriver.o' line, depending on the type of driver. @@ -155,7 +157,7 @@ Inside the initialization function, you should perform the following tasks: o Set up each subdevice. - o Return 0, indicating sucess. If there were any errors along + o Return 0, indicating success. If there were any errors along the way, you should return the appropriate error number. If an error is returned, the _detach function is called. The _detach function should check any resources that may have been -- 2.26.2