Re: [PATCH 0/9] staging: comedi: update auto-attach mechanism

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

 



On Fri, Oct 26, 2012 at 03:15:19PM +0100, Ian Abbott wrote:
> On 22/10/12 20:44, Greg Kroah-Hartman wrote:
> >On Mon, Oct 15, 2012 at 01:07:30PM +0100, Ian Abbott wrote:
> >>The auto-configuration/auto-attach mechanism in Comedi used by most of
> >>the low-level PCI and USB Comedi hardware drivers currently uses
> >>separate hooks in `struct comedi_driver` for each bus type -
> >>`->attach_usb()` and `->attach_pci()`.  I'd like to move away from that
> >>and use a single auto-attach hook, `->auto_attach()` and make it easy
> >>for an implementation of this hook in a low-level driver to get a
> >>pointer to the `struct pci_dev`, `struct usb_interface` or whatever
> >>device wrapper is relevant to the device being auto-attached to comedi.
> >>
> >>Also, the Comedi core exports nice wrapper functions for auto-attaching
> >>PCI or USB devices (`comedi_pci_auto_config()` and
> >>`comedi_usb_auto_config()`) along with functions for auto-detaching
> >>them, but there is currently no way to auto-attach devices on some
> >>arbitrary type of bus.  Export functions `comedi_auto_config()`
> >>(different to the current static function of the same name) and
> >>`comedi_auto_unconfig()`) to allow this.
> >>
> >>Eventually, there will be nice wrapper functions for some more commonly
> >>used device types such as PCMCIA, but it should be easy enough to
> >>implement those as static inline wrappers around `comedi_auto_config()`
> >>and `comedi_auto_unconfig()`.
> >>
> >>This patch series only changes one PCI driver and one USB driver to use
> >>the new `auto_attach()` hook, but it will be easy enough to change the
> >>others.  Once that is done, the `attach_pci()` and `attach_usb()` hooks
> >>can be removed from `struct comedi_driver`.
> >
> >I took the first two patches here only, care to rework the rest and
> >resend them?
> 
> In the end, only patch 6 needed changing to remove the "magic"
> constant context values.  I've sent a v2 for patch 6 in reply to the
> original patch 6.  Do you still have patches 3-5 and 7-9 available
> or should I resend the lot?

Resend the whole thing please, I don't have any old patches hanging
around anymore.

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux