LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Hartley Sweeten <HartleyS@visionengravers.com>
To: Joe Perches <joe@perches.com>, Ian Abbott <abbotti@mev.co.uk>
Cc: "driverdev-devel@linuxdriverproject.org" 
	<driverdev-devel@linuxdriverproject.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 00/56] staging: comedi: introduce comedi_pci.h header
Date: Tue, 10 Mar 2015 18:26:46 +0000	[thread overview]
Message-ID: <DC148C5AA1CEBA4E87973D432B1C2D882614CFF6@P3PWEX4MB008.ex4.secureserver.net> (raw)
In-Reply-To: <1426004716.18060.10.camel@perches.com>

On Tuesday, March 10, 2015 9:25 AM, Joe Perches wrote:
> On Tue, 2015-03-10 at 16:10 +0000, Ian Abbott wrote:
>> "comedidev.h" includes PCI-specific stuff that gets included by all
>> comedi drivers including non-PCI ones.  Separate it out into its own
>> header "comedi_pci.h".  Make the new header include <linux/pci.h> and
>> "comedidev.h" so that comedi PCI drivers do not need to include them
>> explicitly.
>
> Isn't the kernel progressing to avoid indirect includes?

It appears so, and in general I agree. But, I also agree with what Ian has
done here.

> Perhaps it'd be nicer to move generic comedi .h files into
> a more common location and change the include path so that
> the include statements don't have to be relative?
>
> Maybe add an include/comedi/ directory?

Ian already submitted similar patches for the comedi USB and PCMCIA
drivers. Those patches have been applied.

The comedi PCI/PCMCIA/USB (i.e. "bus") drivers now just need to include
the "bus"  specific comedi driver header to get the bus specific interface
functions. These functions include the:

module_comedi_"bus"_driver		
	helper macro for the module_init/module_exit boilerplate
comedi_"bus"_driver_register()	
comedi_"bus"_driver_unregister()	
	helper functions to register and unregister the "bus" and comedi drivers
comedi_"bus"_auto_config()
comedi_"bus"_auto_unconfig()
	helper functions for the "bus" driver to probe/remove the comedi driver
comedi_"bus"_enable()
comedi_"bus"_disable()
	helper functions to request and enable/disable and release the I/O
comedi_to_"bus"_dev()
	helper function to get the "bus" device from the comedi device

These comedi_"bus" headers keep the drivers clean and easy to maintain.
The drivers are still responsible for including any headers that are not specifically
needed for the "bus".

When comedi gets moved out of staging we will need to decide where the
headers go. The only one I know for sure is comedi.h. That one is the UAPI
header (include/uapi/comedi.h). The rest in drivers/staging/comedi will need
to either go into include/linux/*.h or include/linux/comedi/*.h.

There are still a couple headers in the comedi/drivers directory. Those do not
need to be exposed so I think the relative include is fine.

Just my two cents....

Regards,
Hartley


  reply	other threads:[~2015-03-10 18:26 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-10 16:10 Ian Abbott
2015-03-10 16:10 ` [PATCH 01/56] staging: comedi: add comedi_pci.h Ian Abbott
2015-03-10 16:10 ` [PATCH 02/56] staging: comedi: comedi_pci.c: include new "comedi_pci.h" header Ian Abbott
2015-03-10 16:10 ` [PATCH 03/56] staging: comedi: 8255_pci: " Ian Abbott
2015-03-10 16:10 ` [PATCH 04/56] staging: comedi: addi_apci_1032: " Ian Abbott
2015-03-10 16:10 ` [PATCH 05/56] staging: comedi: addi_apci_1500: " Ian Abbott
2015-03-10 16:10 ` [PATCH 06/56] staging: comedi: addi_apci_1516: " Ian Abbott
2015-03-10 16:10 ` [PATCH 07/56] staging: comedi: addi_apci_1564: " Ian Abbott
2015-03-10 16:10 ` [PATCH 08/56] staging: comedi: addi_apci_16xx: " Ian Abbott
2015-03-10 16:10 ` [PATCH 09/56] staging: comedi: addi_apci_2032: " Ian Abbott
2015-03-10 16:10 ` [PATCH 10/56] staging: comedi: addi_apci_2200: " Ian Abbott
2015-03-10 16:10 ` [PATCH 11/56] staging: comedi: addi_apci_3120: " Ian Abbott
2015-03-10 16:10 ` [PATCH 12/56] staging: comedi: addi_apci_3501: " Ian Abbott
2015-03-10 16:10 ` [PATCH 13/56] staging: comedi: addi_apci_3xxx: " Ian Abbott
2015-03-10 16:10 ` [PATCH 14/56] staging: comedi: adl_pci6208: " Ian Abbott
2015-03-10 16:10 ` [PATCH 15/56] staging: comedi: adl_pci7x3x: " Ian Abbott
2015-03-10 16:10 ` [PATCH 16/56] staging: comedi: adl_pci8164: " Ian Abbott
2015-03-10 16:10 ` [PATCH 17/56] staging: comedi: adl_pci9111: " Ian Abbott
2015-03-10 16:10 ` [PATCH 18/56] staging: comedi: adl_pci9118: " Ian Abbott
2015-03-10 16:10 ` [PATCH 19/56] staging: comedi: adv_pci1710: " Ian Abbott
2015-03-10 16:10 ` [PATCH 20/56] staging: comedi: adv_pci1723: " Ian Abbott
2015-03-10 16:10 ` [PATCH 21/56] staging: comedi: adv_pci1724: " Ian Abbott
2015-03-10 16:10 ` [PATCH 22/56] staging: comedi: adv_pci_dio: " Ian Abbott
2015-03-10 16:10 ` [PATCH 23/56] staging: comedi: amplc_dio200_pci: " Ian Abbott
2015-03-10 16:10 ` [PATCH 24/56] staging: comedi: amplc_pci224: " Ian Abbott
2015-03-10 16:10 ` [PATCH 25/56] staging: comedi: amplc_pci230: " Ian Abbott
2015-03-10 16:10 ` [PATCH 26/56] staging: comedi: amplc_pci236: " Ian Abbott
2015-03-10 16:10 ` [PATCH 27/56] staging: comedi: amplc_pci263: " Ian Abbott
2015-03-10 16:10 ` [PATCH 28/56] staging: comedi: cb_pcidas64: " Ian Abbott
2015-03-10 16:10 ` [PATCH 29/56] staging: comedi: cb_pcidas: " Ian Abbott
2015-03-10 16:10 ` [PATCH 30/56] staging: comedi: cb_pcidda: " Ian Abbott
2015-03-10 16:10 ` [PATCH 31/56] staging: comedi: cb_pcimdas: " Ian Abbott
2015-03-10 16:10 ` [PATCH 32/56] staging: comedi: cb_pcimdda: " Ian Abbott
2015-03-10 16:10 ` [PATCH 33/56] staging: comedi: contec_pci_dio: " Ian Abbott
2015-03-10 16:10 ` [PATCH 34/56] staging: comedi: daqboard2000: " Ian Abbott
2015-03-10 16:10 ` [PATCH 35/56] staging: comedi: das08_pci: " Ian Abbott
2015-03-10 16:10 ` [PATCH 36/56] staging: comedi: dt3000: " Ian Abbott
2015-03-10 16:10 ` [PATCH 37/56] staging: comedi: dyna_pci10xx: " Ian Abbott
2015-03-10 16:10 ` [PATCH 38/56] staging: comedi: gsc_hpdi: " Ian Abbott
2015-03-10 16:10 ` [PATCH 39/56] staging: comedi: icp_multi: " Ian Abbott
2015-03-10 16:10 ` [PATCH 40/56] staging: comedi: jr3_pci: " Ian Abbott
2015-03-10 16:11 ` [PATCH 41/56] staging: comedi: ke_counter: " Ian Abbott
2015-03-10 16:11 ` [PATCH 42/56] staging: comedi: me4000: " Ian Abbott
2015-03-10 16:11 ` [PATCH 43/56] staging: comedi: me_daq: " Ian Abbott
2015-03-10 16:11 ` [PATCH 44/56] staging: comedi: mf6x4: " Ian Abbott
2015-03-10 16:11 ` [PATCH 45/56] staging: comedi: mite.c: " Ian Abbott
2015-03-10 16:11 ` [PATCH 46/56] staging: comedi: mite.h: " Ian Abbott
2015-03-10 16:11 ` [PATCH 47/56] staging: comedi: ni_6527: " Ian Abbott
2015-03-10 16:11 ` [PATCH 48/56] staging: comedi: ni_65xx: " Ian Abbott
2015-03-10 16:11 ` [PATCH 49/56] staging: comedi: ni_660x: " Ian Abbott
2015-03-10 16:11 ` [PATCH 50/56] staging: comedi: ni_670x: " Ian Abbott
2015-03-10 16:11 ` [PATCH 51/56] staging: comedi: ni_labpc_pci: " Ian Abbott
2015-03-10 16:11 ` [PATCH 52/56] staging: comedi: ni_pcmdio: " Ian Abbott
2015-03-10 16:11 ` [PATCH 53/56] staging: comedi: ni_pcmmio: " Ian Abbott
2015-03-10 16:11 ` [PATCH 54/56] staging: comedi: rtd520: " Ian Abbott
2015-03-10 16:11 ` [PATCH 55/56] staging: comedi: s626: " Ian Abbott
2015-03-10 16:11 ` [PATCH 56/56] staging: comedi: comedi_pci.h: move PCI stuff out of comedidev.h Ian Abbott
2015-03-10 16:25 ` [PATCH 00/56] staging: comedi: introduce comedi_pci.h header Joe Perches
2015-03-10 18:26   ` Hartley Sweeten [this message]
2015-03-10 18:35     ` Joe Perches
2015-03-10 18:38       ` Greg Kroah-Hartman
2015-03-12 10:29   ` Ian Abbott
2015-03-13 10:28     ` Ian Abbott
2015-03-10 20:34 ` Hartley Sweeten

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DC148C5AA1CEBA4E87973D432B1C2D882614CFF6@P3PWEX4MB008.ex4.secureserver.net \
    --to=hartleys@visionengravers.com \
    --cc=abbotti@mev.co.uk \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --subject='RE: [PATCH 00/56] staging: comedi: introduce comedi_pci.h header' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).