<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/staging/comedi, branch v3.14-rc2</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>Staging: comedi: fix extra whitespace style issues in ni_mio_common.c.</title>
<updated>2014-01-13T23:04:52+00:00</updated>
<author>
<name>Chase Southwood</name>
<email>chase.southwood@yahoo.com</email>
</author>
<published>2014-01-11T04:03:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=69ba83585a22091455fdbf7f8b3ddc4788b401e2'/>
<id>69ba83585a22091455fdbf7f8b3ddc4788b401e2</id>
<content type='text'>
This patch for ni_mio_common.c removes extra whitespace causing
checkpatch.pl warnings.

Signed-off-by: Chase Southwood &lt;chase.southwood@yahoo.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch for ni_mio_common.c removes extra whitespace causing
checkpatch.pl warnings.

Signed-off-by: Chase Southwood &lt;chase.southwood@yahoo.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Staging: comedi: fix indentation coding style issue in ni_mio_common.c.</title>
<updated>2014-01-13T23:04:52+00:00</updated>
<author>
<name>Chase Southwood</name>
<email>chase.southwood@yahoo.com</email>
</author>
<published>2014-01-11T04:02:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b9ede3154a4342434c155a7e4daa3915fc9769b1'/>
<id>b9ede3154a4342434c155a7e4daa3915fc9769b1</id>
<content type='text'>
This patch for ni_mio_common.c fixes several indentation warnings from
checkpatch.pl.

Signed-off-by: Chase Southwood &lt;chase.southwood@yahoo.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch for ni_mio_common.c fixes several indentation warnings from
checkpatch.pl.

Signed-off-by: Chase Southwood &lt;chase.southwood@yahoo.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Staging: comedi: fix numerous brace coding style issues in ni_mio_common.c.</title>
<updated>2014-01-13T23:04:52+00:00</updated>
<author>
<name>Chase Southwood</name>
<email>chase.southwood@yahoo.com</email>
</author>
<published>2014-01-11T04:02:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=bc4615561fc3df0826ac9a93876770cdbf673a80'/>
<id>bc4615561fc3df0826ac9a93876770cdbf673a80</id>
<content type='text'>
This patch for ni_mio_common.c removes many unneccesary braces to fix
checkpatch.pl warnings.

Signed-off-by: Chase Southwood &lt;chase.southwood@yahoo.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch for ni_mio_common.c removes many unneccesary braces to fix
checkpatch.pl warnings.

Signed-off-by: Chase Southwood &lt;chase.southwood@yahoo.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>comedi: Humusoft MF634 and MF624 DAQ cards driver</title>
<updated>2014-01-13T23:03:12+00:00</updated>
<author>
<name>Rostislav Lisovy</name>
<email>lisovy@gmail.com</email>
</author>
<published>2014-01-09T22:46:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=04b565021a83ae1940f1f9b801d3ce5b5fc8ee1e'/>
<id>04b565021a83ae1940f1f9b801d3ce5b5fc8ee1e</id>
<content type='text'>
This patch adds Comedi driver for Humusoft MF634 (PCIe) and
MF624 (PCI) data acquisition cards. The legacy card Humusoft
MF614 is not supported. More info about the cards may be found
at http://humusoft.cz/produkty/datacq/
The driver was tested with both cards. Everything seems to work
properly. Just the basic functionality of the card (DIO, ADC, DAC)
is supported by this driver.

Signed-off-by: Rostislav Lisovy &lt;lisovy@gmail.com&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds Comedi driver for Humusoft MF634 (PCIe) and
MF624 (PCI) data acquisition cards. The legacy card Humusoft
MF614 is not supported. More info about the cards may be found
at http://humusoft.cz/produkty/datacq/
The driver was tested with both cards. Everything seems to work
properly. Just the basic functionality of the card (DIO, ADC, DAC)
is supported by this driver.

Signed-off-by: Rostislav Lisovy &lt;lisovy@gmail.com&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Staging: comedi: amcc_s5933: "no space before tabs" coding style fixes.</title>
<updated>2014-01-11T20:41:56+00:00</updated>
<author>
<name>Michal Kwiatkowski</name>
<email>michaelflowersky@geekingspree.com</email>
</author>
<published>2014-01-09T22:58:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=509e42e1d35350cc5c1bbf1800a0d743be16a63a'/>
<id>509e42e1d35350cc5c1bbf1800a0d743be16a63a</id>
<content type='text'>
Fixed a coding style issues.

Signed-off-by: Michal Kwiatkowski &lt;michaelflowersky@geekingspree.com&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed a coding style issues.

Signed-off-by: Michal Kwiatkowski &lt;michaelflowersky@geekingspree.com&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Staging: comedi: fix spacing coding style issue in 8255.c.</title>
<updated>2014-01-11T20:41:56+00:00</updated>
<author>
<name>Chase Southwood</name>
<email>chase.southwood@yahoo.com</email>
</author>
<published>2014-01-10T03:59:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b281539839ef8eacc79f4e12e5ac13202de13d0b'/>
<id>b281539839ef8eacc79f4e12e5ac13202de13d0b</id>
<content type='text'>
This patch for 8255.c fixes a spacing warning found by checkpatch.pl.

Signed-off-by: Chase Southwood &lt;chase.southwood@yahoo.com&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch for 8255.c fixes a spacing warning found by checkpatch.pl.

Signed-off-by: Chase Southwood &lt;chase.southwood@yahoo.com&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: comedi: usbduxsigma: removing unneccesay attached info</title>
<updated>2014-01-09T18:51:54+00:00</updated>
<author>
<name>Bernd Porr</name>
<email>mail@berndporr.me.uk</email>
</author>
<published>2014-01-07T21:43:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2783980525df12b9c49e8b4baaff06abc7f2f8f2'/>
<id>2783980525df12b9c49e8b4baaff06abc7f2f8f2</id>
<content type='text'>
Comedi core now reports that a device has been attached so that
the driver itself won't need to do it any longer. The driver now
just outputs the offset of the ADC converter which is a soft indicator
of the health of the board and also the user can grep this value
from the kernel log easier for debugging purposes.

Signed-off-by: Bernd Porr &lt;mail@berndporr.me.uk&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Comedi core now reports that a device has been attached so that
the driver itself won't need to do it any longer. The driver now
just outputs the offset of the ADC converter which is a soft indicator
of the health of the board and also the user can grep this value
from the kernel log easier for debugging purposes.

Signed-off-by: Bernd Porr &lt;mail@berndporr.me.uk&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: comedi: usbduxsigma: return failure of auto attach</title>
<updated>2014-01-09T18:51:54+00:00</updated>
<author>
<name>Bernd Porr</name>
<email>mail@berndporr.me.uk</email>
</author>
<published>2014-01-07T21:43:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7a45ae6edf808821a9799eccd9043177463aa05f'/>
<id>7a45ae6edf808821a9799eccd9043177463aa05f</id>
<content type='text'>
The function usbduxsigma_getstatusinfo() returns a negative
value in case there has been a communication error with
the board. This should always work and if this communication
fails then there is something seriously wrong with the board.
This is now returned to the caller so that it can
terminte the auto attachement. The return command also prevents
printing out the offset value in case of a fault.

Signed-off-by: Bernd Porr &lt;mail@berndporr.me.uk&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function usbduxsigma_getstatusinfo() returns a negative
value in case there has been a communication error with
the board. This should always work and if this communication
fails then there is something seriously wrong with the board.
This is now returned to the caller so that it can
terminte the auto attachement. The return command also prevents
printing out the offset value in case of a fault.

Signed-off-by: Bernd Porr &lt;mail@berndporr.me.uk&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: comedi: report success/failure of autoconfig</title>
<updated>2014-01-09T18:51:54+00:00</updated>
<author>
<name>Bernd Porr</name>
<email>mail@berndporr.me.uk</email>
</author>
<published>2014-01-07T21:42:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=bcb6232d090c82e41d6bce9474e031bfd948fcdb'/>
<id>bcb6232d090c82e41d6bce9474e031bfd948fcdb</id>
<content type='text'>
Added success message to the driver autoconfig and error
message in case it fails. A success message is required
so that the user can find out which comedi driver has been
associated with which udev device. This also makes troubleshooting
much easier when more than one card is in the computer or
there is a mix of USB and PCI devices.
As Ian suggested we should report both the driver and the board
which might have different names, especially if one driver covers a
range of different boards.

Signed-off-by: Bernd Porr &lt;mail@berndporr.me.uk&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added success message to the driver autoconfig and error
message in case it fails. A success message is required
so that the user can find out which comedi driver has been
associated with which udev device. This also makes troubleshooting
much easier when more than one card is in the computer or
there is a mix of USB and PCI devices.
As Ian suggested we should report both the driver and the board
which might have different names, especially if one driver covers a
range of different boards.

Signed-off-by: Bernd Porr &lt;mail@berndporr.me.uk&gt;
Reviewed-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>staging: comedi: fix bug destroying subdevice files after parent</title>
<updated>2014-01-09T18:50:13+00:00</updated>
<author>
<name>Ian Abbott</name>
<email>abbotti@mev.co.uk</email>
</author>
<published>2014-01-07T12:38:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=52ef9e7cb317fcb7f8b63f1bec7271e40341ce98'/>
<id>52ef9e7cb317fcb7f8b63f1bec7271e40341ce98</id>
<content type='text'>
`comedi_free_board_dev()` is called (via `comedi_auto_unconfig()` --&gt;
`comedi_release_hardware_device()`) when an auto-configured comedi
device is removed.  This destroys the main sysfs class device and then
calls `comedi_device_cleanup()` to clean up the comedi device.  For
comedi devices that have comedi subdevices that asynchronous commands,
the clean up involves destroying the sysfs class devices associated with
those subdevices.

There is a bug in the above sequence because the sysfs class devices
associated with the comedi subdevices are children of the sysfs class
device associated with the main comedi device.  Therefore they will have
been automatically destroyed when the main sysfs class device is
destroyed.  When they are destroyed again as part of the clean-up, they
will not be found, leading to a warning and a stack trace similar to
this:

------------[ cut here ]------------
WARNING: CPU: 1 PID: 1213 at fs/sysfs/group.c:214
sysfs_remove_group+0x4e/0xa7()
sysfs group ffffffff817504c0 not found for kobject 'comedi4_subd0'
Modules linked in: nfsd auth_rpcgss oid_registry exportfs nfs_acl lockd
bridge stp llc sunrpc fuse binfmt_misc cpufreq_userspace sr_mod
snd_hda_codec_analog cdrom powernow_k8 kvm_amd kvm amplc_pci230(C)
8255(C) comedi(C) pcmcia xhci_hcd ehci_pci pcmcia_core ohci_pci ohci_hcd
ehci_hcd usbcore snd_hda_intel snd_hda_codec snd_pcm k8temp
snd_page_alloc 8139too snd_timer snd soundcore mii usb_common forcedeth
pata_amd
CPU: 1 PID: 1213 Comm: kworker/u4:6 Tainted: G         C
3.13.0-rc5-ija1+ #20
Hardware name: System manufacturer System Product Name/M2N-E, BIOS ASUS
M2N-E ACPI BIOS Revision 5001 03/23/2010
Workqueue: sysfsd sysfs_schedule_callback_work
 0000000000000000 ffff8800bf17fb38 ffffffff814672ce ffff8800bf17fb80
 ffff8800bf17fb70 ffffffff8103470b ffffffff8114f780 0000000000000000
 ffffffff817504c0 ffff8800bf39f410 ffff880139b68670 ffff8800bf17fbd0
Call Trace:
 [&lt;ffffffff814672ce&gt;] dump_stack+0x45/0x56
 [&lt;ffffffff8103470b&gt;] warn_slowpath_common+0x7a/0x93
 [&lt;ffffffff8114f780&gt;] ? sysfs_remove_group+0x4e/0xa7
 [&lt;ffffffff8103476b&gt;] warn_slowpath_fmt+0x47/0x49
 [&lt;ffffffff8114e92d&gt;] ? sysfs_get_dirent_ns+0x5e/0x66
 [&lt;ffffffff8114f780&gt;] sysfs_remove_group+0x4e/0xa7
 [&lt;ffffffff8132aac0&gt;] dpm_sysfs_remove+0x37/0x3b
 [&lt;ffffffff81323781&gt;] device_del+0x3e/0x173
 [&lt;ffffffff813238c3&gt;] device_unregister+0xd/0x18
 [&lt;ffffffff8132392e&gt;] device_destroy+0x33/0x37
 [&lt;ffffffffa0212086&gt;] comedi_free_subdevice_minor+0x80/0x92 [comedi]
 [&lt;ffffffffa02128bb&gt;] comedi_device_detach+0x79/0x152 [comedi]
 [&lt;ffffffffa020f223&gt;] comedi_device_cleanup+0x36/0x57 [comedi]
 [&lt;ffffffffa020f275&gt;] comedi_free_board_dev+0x31/0x3c [comedi]
 [&lt;ffffffffa0211f2a&gt;] comedi_release_hardware_device+0x5a/0x73 [comedi]
 [&lt;ffffffffa0212547&gt;] comedi_auto_unconfig+0xe/0x10 [comedi]
 [&lt;ffffffffa021357c&gt;] comedi_pci_auto_unconfig+0x10/0x12 [comedi]
 [&lt;ffffffff811d2335&gt;] pci_device_remove+0x40/0x8a
 [&lt;ffffffff813261d0&gt;] __device_release_driver+0x84/0xda
 [&lt;ffffffff81326244&gt;] device_release_driver+0x1e/0x2b
 [&lt;ffffffff811cdcb5&gt;] pci_stop_bus_device+0x44/0x87
 [&lt;ffffffff811cdde2&gt;] pci_stop_and_remove_bus_device+0xd/0x18
 [&lt;ffffffff811d3f3d&gt;] remove_callback+0x20/0x2f
 [&lt;ffffffff8114d1f7&gt;] sysfs_schedule_callback_work+0xf/0x70
 [&lt;ffffffff81049498&gt;] process_one_work+0x1d6/0x34c
 [&lt;ffffffff81049a5f&gt;] worker_thread+0x1cf/0x2b5
 [&lt;ffffffff81049890&gt;] ? rescuer_thread+0x258/0x258
 [&lt;ffffffff8104e0e6&gt;] kthread+0xd6/0xde
 [&lt;ffffffff8104e010&gt;] ? kthread_create_on_node+0x160/0x160
 [&lt;ffffffff81472cbc&gt;] ret_from_fork+0x7c/0xb0
 [&lt;ffffffff8104e010&gt;] ? kthread_create_on_node+0x160/0x160
---[ end trace 94722aa2936a7adf ]---

To correct the bug, rearrange `comedi_free_board_dev()` to destroy the
main sysfs class device *after* the clean-up operation.

Thanks to Bernd Porr for finding the bug and his initial attempt to fix
it.

Reported-by: Bernd Porr &lt;mail@berndporr.me.uk&gt;
Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Cc: Bernd Porr &lt;mail@berndporr.me.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`comedi_free_board_dev()` is called (via `comedi_auto_unconfig()` --&gt;
`comedi_release_hardware_device()`) when an auto-configured comedi
device is removed.  This destroys the main sysfs class device and then
calls `comedi_device_cleanup()` to clean up the comedi device.  For
comedi devices that have comedi subdevices that asynchronous commands,
the clean up involves destroying the sysfs class devices associated with
those subdevices.

There is a bug in the above sequence because the sysfs class devices
associated with the comedi subdevices are children of the sysfs class
device associated with the main comedi device.  Therefore they will have
been automatically destroyed when the main sysfs class device is
destroyed.  When they are destroyed again as part of the clean-up, they
will not be found, leading to a warning and a stack trace similar to
this:

------------[ cut here ]------------
WARNING: CPU: 1 PID: 1213 at fs/sysfs/group.c:214
sysfs_remove_group+0x4e/0xa7()
sysfs group ffffffff817504c0 not found for kobject 'comedi4_subd0'
Modules linked in: nfsd auth_rpcgss oid_registry exportfs nfs_acl lockd
bridge stp llc sunrpc fuse binfmt_misc cpufreq_userspace sr_mod
snd_hda_codec_analog cdrom powernow_k8 kvm_amd kvm amplc_pci230(C)
8255(C) comedi(C) pcmcia xhci_hcd ehci_pci pcmcia_core ohci_pci ohci_hcd
ehci_hcd usbcore snd_hda_intel snd_hda_codec snd_pcm k8temp
snd_page_alloc 8139too snd_timer snd soundcore mii usb_common forcedeth
pata_amd
CPU: 1 PID: 1213 Comm: kworker/u4:6 Tainted: G         C
3.13.0-rc5-ija1+ #20
Hardware name: System manufacturer System Product Name/M2N-E, BIOS ASUS
M2N-E ACPI BIOS Revision 5001 03/23/2010
Workqueue: sysfsd sysfs_schedule_callback_work
 0000000000000000 ffff8800bf17fb38 ffffffff814672ce ffff8800bf17fb80
 ffff8800bf17fb70 ffffffff8103470b ffffffff8114f780 0000000000000000
 ffffffff817504c0 ffff8800bf39f410 ffff880139b68670 ffff8800bf17fbd0
Call Trace:
 [&lt;ffffffff814672ce&gt;] dump_stack+0x45/0x56
 [&lt;ffffffff8103470b&gt;] warn_slowpath_common+0x7a/0x93
 [&lt;ffffffff8114f780&gt;] ? sysfs_remove_group+0x4e/0xa7
 [&lt;ffffffff8103476b&gt;] warn_slowpath_fmt+0x47/0x49
 [&lt;ffffffff8114e92d&gt;] ? sysfs_get_dirent_ns+0x5e/0x66
 [&lt;ffffffff8114f780&gt;] sysfs_remove_group+0x4e/0xa7
 [&lt;ffffffff8132aac0&gt;] dpm_sysfs_remove+0x37/0x3b
 [&lt;ffffffff81323781&gt;] device_del+0x3e/0x173
 [&lt;ffffffff813238c3&gt;] device_unregister+0xd/0x18
 [&lt;ffffffff8132392e&gt;] device_destroy+0x33/0x37
 [&lt;ffffffffa0212086&gt;] comedi_free_subdevice_minor+0x80/0x92 [comedi]
 [&lt;ffffffffa02128bb&gt;] comedi_device_detach+0x79/0x152 [comedi]
 [&lt;ffffffffa020f223&gt;] comedi_device_cleanup+0x36/0x57 [comedi]
 [&lt;ffffffffa020f275&gt;] comedi_free_board_dev+0x31/0x3c [comedi]
 [&lt;ffffffffa0211f2a&gt;] comedi_release_hardware_device+0x5a/0x73 [comedi]
 [&lt;ffffffffa0212547&gt;] comedi_auto_unconfig+0xe/0x10 [comedi]
 [&lt;ffffffffa021357c&gt;] comedi_pci_auto_unconfig+0x10/0x12 [comedi]
 [&lt;ffffffff811d2335&gt;] pci_device_remove+0x40/0x8a
 [&lt;ffffffff813261d0&gt;] __device_release_driver+0x84/0xda
 [&lt;ffffffff81326244&gt;] device_release_driver+0x1e/0x2b
 [&lt;ffffffff811cdcb5&gt;] pci_stop_bus_device+0x44/0x87
 [&lt;ffffffff811cdde2&gt;] pci_stop_and_remove_bus_device+0xd/0x18
 [&lt;ffffffff811d3f3d&gt;] remove_callback+0x20/0x2f
 [&lt;ffffffff8114d1f7&gt;] sysfs_schedule_callback_work+0xf/0x70
 [&lt;ffffffff81049498&gt;] process_one_work+0x1d6/0x34c
 [&lt;ffffffff81049a5f&gt;] worker_thread+0x1cf/0x2b5
 [&lt;ffffffff81049890&gt;] ? rescuer_thread+0x258/0x258
 [&lt;ffffffff8104e0e6&gt;] kthread+0xd6/0xde
 [&lt;ffffffff8104e010&gt;] ? kthread_create_on_node+0x160/0x160
 [&lt;ffffffff81472cbc&gt;] ret_from_fork+0x7c/0xb0
 [&lt;ffffffff8104e010&gt;] ? kthread_create_on_node+0x160/0x160
---[ end trace 94722aa2936a7adf ]---

To correct the bug, rearrange `comedi_free_board_dev()` to destroy the
main sysfs class device *after* the clean-up operation.

Thanks to Bernd Porr for finding the bug and his initial attempt to fix
it.

Reported-by: Bernd Porr &lt;mail@berndporr.me.uk&gt;
Signed-off-by: Ian Abbott &lt;abbotti@mev.co.uk&gt;
Cc: Bernd Porr &lt;mail@berndporr.me.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
