<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/char/misc.c, branch v2.6.27.57</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>device create: char: convert device_create to device_create_drvdata</title>
<updated>2008-07-22T04:54:41+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2008-05-21T19:52:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=47aa5793f78c274d51711f6a621fa6b02d4e6402'/>
<id>47aa5793f78c274d51711f6a621fa6b02d4e6402</id>
<content type='text'>
device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>misc: cdev lock_kernel() pushdown</title>
<updated>2008-06-20T20:05:48+00:00</updated>
<author>
<name>Jonathan Corbet</name>
<email>corbet@lwn.net</email>
</author>
<published>2008-05-15T17:07:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=309c4551c0fa0897d5343c36cbfbfa39f1f41b88'/>
<id>309c4551c0fa0897d5343c36cbfbfa39f1f41b88</id>
<content type='text'>
misc_open() looks fine, but who knows what all of the misc drivers are
doing in their open() functions?

Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
misc_open() looks fine, but who knows what all of the misc drivers are
doing in their open() functions?

Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers: use non-racy method for proc entries creation</title>
<updated>2008-04-29T15:06:22+00:00</updated>
<author>
<name>Denis V. Lunev</name>
<email>den@openvz.org</email>
</author>
<published>2008-04-29T08:02:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1b50221738108c438d5f25c7a043fb89e9e27044'/>
<id>1b50221738108c438d5f25c7a043fb89e9e27044</id>
<content type='text'>
Use proc_create()/proc_create_data() to make sure that -&gt;proc_fops and -&gt;data
be setup before gluing PDE to main tree.

Signed-off-by: Denis V. Lunev &lt;den@openvz.org&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Cc: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Acked-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use proc_create()/proc_create_data() to make sure that -&gt;proc_fops and -&gt;data
be setup before gluing PDE to main tree.

Signed-off-by: Denis V. Lunev &lt;den@openvz.org&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Cc: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Acked-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PM: Remove destroy_suspended_device()</title>
<updated>2008-04-20T02:10:28+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2008-03-23T19:28:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b844eba292b477cda14582bfc6f535deed57a82d'/>
<id>b844eba292b477cda14582bfc6f535deed57a82d</id>
<content type='text'>
After 2.6.24 there was a plan to make the PM core acquire all device
semaphores during a suspend/hibernation to protect itself from
concurrent operations involving device objects.  That proved to be
too heavy-handed and we found a better way to achieve the goal, but
before it happened, we had introduced the functions
device_pm_schedule_removal() and destroy_suspended_device() to allow
drivers to "safely" destroy a suspended device and we had adapted some
drivers to use them.  Now that these functions are no longer necessary,
it seems reasonable to remove them and modify their users to use the
normal device unregistration instead.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After 2.6.24 there was a plan to make the PM core acquire all device
semaphores during a suspend/hibernation to protect itself from
concurrent operations involving device objects.  That proved to be
too heavy-handed and we found a better way to achieve the goal, but
before it happened, we had introduced the functions
device_pm_schedule_removal() and destroy_suspended_device() to allow
drivers to "safely" destroy a suspended device and we had adapted some
drivers to use them.  Now that these functions are no longer necessary,
it seems reasonable to remove them and modify their users to use the
normal device unregistration instead.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Misc: Add possibility to remove misc devices during suspend/resume</title>
<updated>2008-02-05T17:44:23+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2008-02-05T06:30:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=533354d4ac48b7df99f18f952e5d51c3f59ba56c'/>
<id>533354d4ac48b7df99f18f952e5d51c3f59ba56c</id>
<content type='text'>
Make it possible to unregister a misc device object in a safe way during a
suspend/resume cycle.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Cc: Michael Buesch &lt;mb@bu3sch.de&gt;
Cc: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: "John W. Linville" &lt;linville@tuxdriver.com&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: Len Brown &lt;lenb@kernel.org&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make it possible to unregister a misc device object in a safe way during a
suspend/resume cycle.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Cc: Michael Buesch &lt;mb@bu3sch.de&gt;
Cc: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: "John W. Linville" &lt;linville@tuxdriver.com&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: Len Brown &lt;lenb@kernel.org&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Cc: Richard Purdie &lt;rpurdie@rpsys.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Make /proc/misc use seq_list_xxx helpers</title>
<updated>2007-07-16T16:05:42+00:00</updated>
<author>
<name>Pavel Emelianov</name>
<email>xemul@sw.ru</email>
</author>
<published>2007-07-16T06:39:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=46c65b71e6122b89cd7b2bb36c1ba26d07e84fcd'/>
<id>46c65b71e6122b89cd7b2bb36c1ba26d07e84fcd</id>
<content type='text'>
Simple and stupid - just use the helpers.

Signed-off-by: Pavel Emelianov &lt;xemul@openvz.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Simple and stupid - just use the helpers.

Signed-off-by: Pavel Emelianov &lt;xemul@openvz.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>use mutex instead of semaphore for misc char devices</title>
<updated>2007-05-08T18:15:15+00:00</updated>
<author>
<name>Matthias Kaehlcke</name>
<email>matthias.kaehlcke@gmail.com</email>
</author>
<published>2007-05-08T07:32:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0e82d5b61841f2b9e2d31a4299ce09752c5d3288'/>
<id>0e82d5b61841f2b9e2d31a4299ce09752c5d3288</id>
<content type='text'>
The misc character device driver uses a semaphore as mutex.  Use the mutex API
instead of the (binary) semaphore.

Signed-off-by: Matthias Kaehlcke &lt;matthias.kaehlcke@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The misc character device driver uses a semaphore as mutex.  Use the mutex API
instead of the (binary) semaphore.

Signed-off-by: Matthias Kaehlcke &lt;matthias.kaehlcke@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] Correct misc_register return code handling in several drivers</title>
<updated>2006-12-07T16:39:35+00:00</updated>
<author>
<name>Neil Horman</name>
<email>nhorman@tuxdriver.com</email>
</author>
<published>2006-12-07T04:37:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5d469ec0f40d65b2a0a704402990a43b2dafe197'/>
<id>5d469ec0f40d65b2a0a704402990a43b2dafe197</id>
<content type='text'>
Clean up several code points in which the return code from misc_register is
not handled properly.

Several modules failed to deregister various hooks when misc_register fails,
and this patch cleans them up.  Also there are a few modules that legitimately
don't care about the failure status of misc register.  These drivers however
unilaterally call misc_deregister on module unload.

Since misc_register doesn't initialize the list_head in the init_routine if it
fails, the deregister operation is at risk for oopsing when list_del is
called.  The initial solution was to manually init the list in the miscdev
structure in each of those modules, but the consensus in this thread was to
consolodate and do that universally inside misc_register.

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Cc: Bjorn Helgaas &lt;bjorn.helgaas@hp.com&gt;
Cc: Kylene Jo Hall &lt;kjhall@us.ibm.com&gt;
Cc: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Cc: Olaf Hering &lt;olh@suse.de&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Clean up several code points in which the return code from misc_register is
not handled properly.

Several modules failed to deregister various hooks when misc_register fails,
and this patch cleans them up.  Also there are a few modules that legitimately
don't care about the failure status of misc register.  These drivers however
unilaterally call misc_deregister on module unload.

Since misc_register doesn't initialize the list_head in the init_routine if it
fails, the deregister operation is at risk for oopsing when list_del is
called.  The initial solution was to manually init the list in the miscdev
structure in each of those modules, but the consensus in this thread was to
consolodate and do that universally inside misc_register.

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Cc: Bjorn Helgaas &lt;bjorn.helgaas@hp.com&gt;
Cc: Kylene Jo Hall &lt;kjhall@us.ibm.com&gt;
Cc: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Cc: Olaf Hering &lt;olh@suse.de&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Driver core: change misc class_devices to be real devices</title>
<updated>2006-12-01T22:51:59+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2006-07-27T23:16:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=94fbcded4ea0dc14cbfb222a5c68372f150d1476'/>
<id>94fbcded4ea0dc14cbfb222a5c68372f150d1476</id>
<content type='text'>
This also ment that some of the misc drivers had to also be fixed
up as they were assuming the device was a class_device.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This also ment that some of the misc drivers had to also be fixed
up as they were assuming the device was a class_device.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] make more file_operation structs static</title>
<updated>2006-07-03T22:26:59+00:00</updated>
<author>
<name>Arjan van de Ven</name>
<email>arjan@infradead.org</email>
</author>
<published>2006-07-03T07:24:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=62322d2554d2f9680c8ace7bbf1f97d8fa84ad1a'/>
<id>62322d2554d2f9680c8ace7bbf1f97d8fa84ad1a</id>
<content type='text'>
Mark the static struct file_operations in drivers/char as const.  Making
them const prevents accidental bugs, and moves them to the .rodata section
so that they no longer do any false sharing; in addition with the proper
debug option they are then protected against corruption..

[akpm@osdl.org: build fix]
Signed-off-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mark the static struct file_operations in drivers/char as const.  Making
them const prevents accidental bugs, and moves them to the .rodata section
so that they no longer do any false sharing; in addition with the proper
debug option they are then protected against corruption..

[akpm@osdl.org: build fix]
Signed-off-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
