<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/staging/comedi/drivers.c, branch v3.8.2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/staging/comedi/drivers.c?h=v3.8.2</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/staging/comedi/drivers.c?h=v3.8.2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-11-27T17:16:38Z</updated>
<entry>
<title>staging: comedi: remove unnecessary '#define __NO_VERSION__'</title>
<updated>2012-11-27T17:16:38Z</updated>
<author>
<name>H Hartley Sweeten</name>
<email>hartleys@visionengravers.com</email>
</author>
<published>2012-11-27T00:34:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1b6c710e2a0f636aa038dc80dc114edf8217f5e6'/>
<id>urn:sha1:1b6c710e2a0f636aa038dc80dc114edf8217f5e6</id>
<content type='text'>
This define is no longer required for multi-file modules.

Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Cc: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: comedi: remove unnecessary '#define _GNU_SOURCE'</title>
<updated>2012-11-27T17:16:38Z</updated>
<author>
<name>H Hartley Sweeten</name>
<email>hartleys@visionengravers.com</email>
</author>
<published>2012-11-27T00:34:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1be287f9dba0e2d5f94edaa54ecda957d1274c7f'/>
<id>urn:sha1:1be287f9dba0e2d5f94edaa54ecda957d1274c7f</id>
<content type='text'>
This define is not needed.

Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Cc: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: comedi: use inlines for PCI/USB auto config</title>
<updated>2012-11-15T00:25:48Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2012-11-14T13:10:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=581a7ddec13d8f08b308c4764090bf57b0254f6f'/>
<id>urn:sha1:581a7ddec13d8f08b308c4764090bf57b0254f6f</id>
<content type='text'>
Apart from the somewhat unnecessary `BUG_ON()` calls,
`comedi_pci_auto_config()` and `comedi_usb_auto_config()` are just
one-line wrappers around `comedi_auto_config()`, and
`comedi_pci_auto_unconfig()` and `comedi_usb_auto_unconfig()` are just
one-line wrappers around `comedi_auto_unconfig()`.  Convert them to
inline functions and remove the `BUG_ON()` calls.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: comedi: simplify comedi_auto_attach()</title>
<updated>2012-11-15T00:25:48Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2012-11-14T13:10:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a588da1d5aac72801df0c83075225a6074c81ac5'/>
<id>urn:sha1:a588da1d5aac72801df0c83075225a6074c81ac5</id>
<content type='text'>
`comedi_auto_config()` just calls internal function
`comedi_auto_config_helper()`, passing it a wrapper function
`comedi_auto_config_wrapper()` to handle the specifics of checking and
calling the low-level comedi driver's `auto_attach()` handler.

Since there are no other callers of `comedi_auto_config_helper()` or
`comedi_auto_config_wrapper()`, combine everything into the single
exported function `comedi_auto_config()`.

Change the ordering of the check for existence of the low-level comedi
driver's `auto_attach()` handler and the allocation of the comedi minor
device number.  This means the log message warning of the absence of the
handler now has to be refer to the hardware device instead of the
not-yet-allocated comedi device.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: comedi: don't check driver-&gt;auto_attach</title>
<updated>2012-11-15T00:25:47Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2012-11-14T13:10:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=af448aca8fa41789aec8a968a56ed0868c803a2b'/>
<id>urn:sha1:af448aca8fa41789aec8a968a56ed0868c803a2b</id>
<content type='text'>
There is no need for `comedi_pci_auto_config()` and
`comedi_usb_auto_config()` to check that `driver-&gt;auto_attach` is
non-null before calling `comedi_auto_attach()` as this check is done by
`comedi_auto_config()` itself (actually by
`comedi_auto_config_wrapper()`).  Remove the unnecessary checks.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: comedi: don't call attach_usb handler</title>
<updated>2012-11-15T00:25:47Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2012-11-14T13:10:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=45d6f1965e9a8b830dd69b98cf8d45de53394ee5'/>
<id>urn:sha1:45d6f1965e9a8b830dd69b98cf8d45de53394ee5</id>
<content type='text'>
All the Comedi drivers that call `comedi_usb_auto_config()` have
replaced the `attach_usb()` handler in their `struct comedi_driver` with
a `auto_attach()` handler, so there is no need to check for the
existence of the `attach_usb()` handler any more.  Remove this check and
the code that calls it.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: comedi: don't call attach_pci handler</title>
<updated>2012-11-15T00:25:47Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2012-11-14T13:10:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a692e9743a7b2085afbca2f7e50a449c3e205cc0'/>
<id>urn:sha1:a692e9743a7b2085afbca2f7e50a449c3e205cc0</id>
<content type='text'>
All the Comedi drivers that call `comedi_pci_auto_config()` have
replaced the `attach_pci()` handler in their `struct comedi_driver` with
a `auto_attach()` handler, so there is no need to check for the
existence of the `attach_pci()` handler any more.  Remove this check and
the code that calls it.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: comedi: remove old auto-config</title>
<updated>2012-11-15T00:25:47Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2012-11-14T13:10:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=847d74a26010e9bae51299b7c1008c5ec9a349f4'/>
<id>urn:sha1:847d74a26010e9bae51299b7c1008c5ec9a349f4</id>
<content type='text'>
All the Comedi drivers that call `comedi_pci_auto_config()` or
`comedi_usb_auto_config()` define a `auto_attach()` handler in their
`struct comedi_driver`.  There is no need to fall back to abusing the
`attach()` handler any more, so remove the code that supports that.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: comedi: support auto_attach() for PCI and USB</title>
<updated>2012-10-29T22:02:08Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2012-10-27T20:44:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d5121914a22c22d849abb57d086fe408c9ca2c0c'/>
<id>urn:sha1:d5121914a22c22d849abb57d086fe408c9ca2c0c</id>
<content type='text'>
Allow `comedi_pci_auto_config()` and `comedi_usb_auto_config()` to use
the new `auto_attach()` hook in the low-level driver's `struct
comedi_driver` if it is set and the `attach_pci()` or `attach_usb()`
hook (for PCI or USB respectively) is `NULL`.

Eventually, the `auto_attach()` hook will be the only way of
auto-configuring hardware devices as comedi devices and the bus-type
specific `attach_pci()` and `attach_usb()` hooks will be removed.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>staging: comedi: add generic auto-config functions</title>
<updated>2012-10-29T22:02:08Z</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2012-10-27T20:44:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8ed705aff0652fdbd2c6b406155d7d480e1aabe0'/>
<id>urn:sha1:8ed705aff0652fdbd2c6b406155d7d480e1aabe0</id>
<content type='text'>
Add (and export) generic auto-config function `comedi_auto_config()` to
allow hardware devices on arbitrary bus types (e.g. platform devices,
spi devices, etc.) to be auto-configured as comedi devices.  This uses a
new `auto_attach()` hook in the `struct comedi_driver`.  This new hook
will eventually replace the bus-specific `attach_pci()` and
`attach_usb()` hooks in the low-level comedi drivers.

When the `auto_attach()` hook is called in the low-level driver, the
`hw_dev` member of the `struct comedi_device` will have already been set
to the hardware device passed to `comedi_auto_config()`.  The low-level
driver can convert this to some bus-device wrapper structure pointer,
possibly with the help of the `context` parameter that is passed
unchanged from the `comedi_auto_config()` call.

Also export the existing `comedi_auto_unconfig()` function as the
matching call to `comedi_auto_config()`.

Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
