<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/platform/x86/wmi.c, branch v3.0.87</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>WMI: properly cleanup devices to avoid crashes</title>
<updated>2011-11-11T17:36:09+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2011-09-07T22:00:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cf541bb3f2532e7493720a208021e43b85156870'/>
<id>cf541bb3f2532e7493720a208021e43b85156870</id>
<content type='text'>
commit 023b9565972a4a5e0f01b9aa32680af6e9b5c388 upstream.

We need to remove devices that we destroy from the list, otherwise
we'll crash if there are more than one "_WDG" methods in DSDT.

This fixes https://bugzilla.kernel.org/show_bug.cgi?id=32052

Tested-by: Ilya Tumaykin &lt;librarian_rus@yahoo.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Acked-by: Carlos Corbacho &lt;carlos@strangeworlds.co.uk&gt;
Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&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>
commit 023b9565972a4a5e0f01b9aa32680af6e9b5c388 upstream.

We need to remove devices that we destroy from the list, otherwise
we'll crash if there are more than one "_WDG" methods in DSDT.

This fixes https://bugzilla.kernel.org/show_bug.cgi?id=32052

Tested-by: Ilya Tumaykin &lt;librarian_rus@yahoo.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Acked-by: Carlos Corbacho &lt;carlos@strangeworlds.co.uk&gt;
Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>wmi: Removed trailing whitespace from logging message.</title>
<updated>2011-05-27T16:35:53+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2011-03-29T22:21:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=dd8e908e82964b8b493ef241707fb6109aa41cfd'/>
<id>dd8e908e82964b8b493ef241707fb6109aa41cfd</id>
<content type='text'>
Just neatening.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Just neatening.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>WMI: return error if wmi_create_device() fails</title>
<updated>2011-01-07T22:03:45+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2010-12-06T21:44:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e1e0dacba5af2b0cd8f9043d0b937296c90bc990'/>
<id>e1e0dacba5af2b0cd8f9043d0b937296c90bc990</id>
<content type='text'>
The break resets the retval to 0 but we want to return an error code.
This was introduced in c64eefd48c4 "WMI: embed struct device directly
into wmi_block"

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&gt;
Acked-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The break resets the retval to 0 but we want to return an error code.
This was introduced in c64eefd48c4 "WMI: embed struct device directly
into wmi_block"

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&gt;
Acked-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>WMI: Cater for multiple events with same GUID</title>
<updated>2011-01-07T22:03:41+00:00</updated>
<author>
<name>Colin King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2010-11-19T15:40:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=58f6425eb92f54943878b0b3f9c1e51f99c2cb72'/>
<id>58f6425eb92f54943878b0b3f9c1e51f99c2cb72</id>
<content type='text'>
WMI data blocks can contain WMI events with the same GUID but with
different notifiy_ids, for example volume up/down hotkeys.
This patch enables a single event handler to be registered and
unregistered against all events with same GUID but different
notify_ids.  Since an event handler is passed the notify_id of
an event it can can differentiate between the different events.

The patch also ensures we only register and unregister a device per
unique GUID.

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
WMI data blocks can contain WMI events with the same GUID but with
different notifiy_ids, for example volume up/down hotkeys.
This patch enables a single event handler to be registered and
unregistered against all events with same GUID but different
notify_ids.  Since an event handler is passed the notify_id of
an event it can can differentiate between the different events.

The patch also ensures we only register and unregister a device per
unique GUID.

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>wmi: use memcmp instead of strncmp to compare GUIDs</title>
<updated>2010-12-06T22:19:13+00:00</updated>
<author>
<name>Thadeu Lima de Souza Cascardo</name>
<email>cascardo@holoscopio.com</email>
</author>
<published>2010-11-28T21:46:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8b14d7b22c61f17ccb869e0047d9df6dd9f50a9f'/>
<id>8b14d7b22c61f17ccb869e0047d9df6dd9f50a9f</id>
<content type='text'>
While looking for the duplicates in /sys/class/wmi/, I couldn't find
them. The code that looks for duplicates uses strncmp in a binary GUID,
which may contain zero bytes. The right function is memcmp, which is
also used in another section of wmi code.

It was finding 49142400-C6A3-40FA-BADB-8A2652834100 as a duplicate of
39142400-C6A3-40FA-BADB-8A2652834100. Since the first byte is the fourth
printed, they were found as equal by strncmp.

Signed-off-by: Thadeu Lima de Souza Cascardo &lt;cascardo@holoscopio.com&gt;
Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&gt;
Cc: stable@kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While looking for the duplicates in /sys/class/wmi/, I couldn't find
them. The code that looks for duplicates uses strncmp in a binary GUID,
which may contain zero bytes. The right function is memcmp, which is
also used in another section of wmi code.

It was finding 49142400-C6A3-40FA-BADB-8A2652834100 as a duplicate of
39142400-C6A3-40FA-BADB-8A2652834100. Since the first byte is the fourth
printed, they were found as equal by strncmp.

Signed-off-by: Thadeu Lima de Souza Cascardo &lt;cascardo@holoscopio.com&gt;
Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&gt;
Cc: stable@kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>WMI: embed struct device directly into wmi_block</title>
<updated>2010-10-21T13:36:48+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2010-08-26T07:15:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c64eefd48c44fa8145ad1f96edabf4a053fffc49'/>
<id>c64eefd48c44fa8145ad1f96edabf4a053fffc49</id>
<content type='text'>
Instead of creating wmi_blocks and then register corresponding devices
on a separate pass do it all in one shot, since lifetime rules for both
objects are the same. This also takes care of leaking devices when
device_create fails for one of them.

Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of creating wmi_blocks and then register corresponding devices
on a separate pass do it all in one shot, since lifetime rules for both
objects are the same. This also takes care of leaking devices when
device_create fails for one of them.

Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>WMI: make use of class device's attributres</title>
<updated>2010-10-21T13:36:48+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2010-08-26T07:15:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=614ef4322200086447d5e1f79e8876213c94f499'/>
<id>614ef4322200086447d5e1f79e8876213c94f499</id>
<content type='text'>
Instead of adding modalias attribute manually set it up as class's
device attribute so driver core will create and remove it for us.

Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of adding modalias attribute manually set it up as class's
device attribute so driver core will create and remove it for us.

Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>WMI: use pr_err() and friends</title>
<updated>2010-10-21T13:36:48+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2010-08-26T07:15:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8e07514db8d037a8454e81cd529a9844c9fa7075'/>
<id>8e07514db8d037a8454e81cd529a9844c9fa7075</id>
<content type='text'>
This makes source more concise and easier to read.

Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes source more concise and easier to read.

Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>WMI: use separate list head for storing wmi blocks</title>
<updated>2010-10-21T13:36:47+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2010-08-26T07:15:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=762e1a2ff6c1116d8f6f175994753fa2319097f2'/>
<id>762e1a2ff6c1116d8f6f175994753fa2319097f2</id>
<content type='text'>
Do not abuse wmi_block structure to hold the head of list
of blocks, use separate list_head for that.

Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Do not abuse wmi_block structure to hold the head of list
of blocks, use separate list_head for that.

Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>WMI: simplify handling of returned WMI blocks in parse_wdg()</title>
<updated>2010-10-21T13:36:47+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2010-08-26T07:15:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=378306628e26d2945a1ed245f177a693c314e68d'/>
<id>378306628e26d2945a1ed245f177a693c314e68d</id>
<content type='text'>
There is no reason why we allocate memory and copy data into an
intermediate buffer, it is not like we are working with data coming
from userspace.

Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is no reason why we allocate memory and copy data into an
intermediate buffer, it is not like we are working with data coming
from userspace.

Signed-off-by: Dmitry Torokhov &lt;dtor@mail.ru&gt;
Signed-off-by: Matthew Garrett &lt;mjg@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
