<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/i2c/i2c-dev.c, branch v3.4.73</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>i2c: Update the FSF address</title>
<updated>2012-03-26T19:47:19+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2012-03-26T19:47:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5694f8a888f8f69a562e4cf939eed81ca7a5ecf2'/>
<id>5694f8a888f8f69a562e4cf939eed81ca7a5ecf2</id>
<content type='text'>
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c-dev: Use memdup_user</title>
<updated>2012-01-12T19:32:04+00:00</updated>
<author>
<name>Thomas Meyer</name>
<email>thomas@m3y3r.de</email>
</author>
<published>2012-01-12T19:32:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a699ed6f1f977dcc4a49452a247cf21dc9cec3f9'/>
<id>a699ed6f1f977dcc4a49452a247cf21dc9cec3f9</id>
<content type='text'>
Use memdup_user rather than duplicating its implementation.
This is a little bit restricted to reduce false positives.

The semantic patch that makes this output is available
in scripts/coccinelle/api/memdup_user.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer &lt;thomas@m3y3r.de&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use memdup_user rather than duplicating its implementation.
This is a little bit restricted to reduce false positives.

The semantic patch that makes this output is available
in scripts/coccinelle/api/memdup_user.cocci.

More information about semantic patching is available at
http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer &lt;thomas@m3y3r.de&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: Make i2cdev_notifier_call static</title>
<updated>2011-11-23T10:33:07+00:00</updated>
<author>
<name>Shubhrajyoti D</name>
<email>shubhrajyoti@ti.com</email>
</author>
<published>2011-11-23T10:33:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=eff245c82f115059648cdce95dd68bb940f2b006'/>
<id>eff245c82f115059648cdce95dd68bb940f2b006</id>
<content type='text'>
The function i2cdev_notifier_call is used only in i2c-dev file
making it static.
Also removes the following sparse warning

drivers/i2c/i2c-dev.c:582:5: warning: symbol 'i2cdev_notifier_call'
was not declared. Should it be static?

Signed-off-by: Shubhrajyoti D &lt;shubhrajyoti@ti.com&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function i2cdev_notifier_call is used only in i2c-dev file
making it static.
Also removes the following sparse warning

drivers/i2c/i2c-dev.c:582:5: warning: symbol 'i2cdev_notifier_call'
was not declared. Should it be static?

Signed-off-by: Shubhrajyoti D &lt;shubhrajyoti@ti.com&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c-dev: Use standard bus notification mechanism</title>
<updated>2011-03-20T13:50:52+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2011-03-20T13:50:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9ea3e941d161f41f920462c50e9b651cc00eccc7'/>
<id>9ea3e941d161f41f920462c50e9b651cc00eccc7</id>
<content type='text'>
Use the standard driver core mechanism to keep track of i2c adapters
present on the system: i2c_for_each_dev and a notifier. This will let
us deprecate and ultimately remove the legacy attach_adapter and
detach_adapter callbacks in i2c_driver.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the standard driver core mechanism to keep track of i2c adapters
present on the system: i2c_for_each_dev and a notifier. This will let
us deprecate and ultimately remove the legacy attach_adapter and
detach_adapter callbacks in i2c_driver.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: Let i2c_parent_is_i2c_adapter return the parent adapter</title>
<updated>2010-10-24T16:16:57+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2010-10-24T16:16:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=97cc4d49cfcda1c2dad89c00b62a25b628ce2115'/>
<id>97cc4d49cfcda1c2dad89c00b62a25b628ce2115</id>
<content type='text'>
This makes the calling site's code clearer IMHO.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Acked-by: Michael Lawnick &lt;ml.lawnick@gmx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes the calling site's code clearer IMHO.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Acked-by: Michael Lawnick &lt;ml.lawnick@gmx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: Multiplexed I2C bus core support</title>
<updated>2010-08-11T16:21:02+00:00</updated>
<author>
<name>Michael Lawnick</name>
<email>ml.lawnick@gmx.de</email>
</author>
<published>2010-08-11T16:21:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0826374bff57411d239f2fcb15da3c35af0a93cd'/>
<id>0826374bff57411d239f2fcb15da3c35af0a93cd</id>
<content type='text'>
Add multiplexed bus core support. I2C multiplexer and switches
like pca954x get instantiated as new adapters per port.

Signed-off-by: Michael Lawnick &lt;ml.lawnick@gmx.de&gt;
Acked-by: Rodolfo Giometti &lt;giometti@linux.it&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add multiplexed bus core support. I2C multiplexer and switches
like pca954x get instantiated as new adapters per port.

Signed-off-by: Michael Lawnick &lt;ml.lawnick@gmx.de&gt;
Acked-by: Rodolfo Giometti &lt;giometti@linux.it&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c-dev: Use memdup_user</title>
<updated>2010-08-11T16:20:55+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>julia@diku.dk</email>
</author>
<published>2010-08-11T16:20:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f1c2e33c295de423db5740647bfaa5e2ad139192'/>
<id>f1c2e33c295de423db5740647bfaa5e2ad139192</id>
<content type='text'>
Use memdup_user when user data is immediately copied into the allocated
region.  Note that in the second case, the ++i is no longer necessary, as
the last value is already freed if needed by the call to memdup_user.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@@
expression from,to,size,flag;
position p;
identifier l1,l2;
@@

-  to = \(kmalloc@p\|kzalloc@p\)(size,flag);
+  to = memdup_user(from,size);
   if (
-      to==NULL
+      IS_ERR(to)
                 || ...) {
   &lt;+... when != goto l1;
-  -ENOMEM
+  PTR_ERR(to)
   ...+&gt;
   }
-  if (copy_from_user(to, from, size) != 0) {
-    &lt;+... when != goto l2;
-    -EFAULT
-    ...+&gt;
-  }
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use memdup_user when user data is immediately copied into the allocated
region.  Note that in the second case, the ++i is no longer necessary, as
the last value is already freed if needed by the call to memdup_user.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@@
expression from,to,size,flag;
position p;
identifier l1,l2;
@@

-  to = \(kmalloc@p\|kzalloc@p\)(size,flag);
+  to = memdup_user(from,size);
   if (
-      to==NULL
+      IS_ERR(to)
                 || ...) {
   &lt;+... when != goto l1;
-  -ENOMEM
+  PTR_ERR(to)
   ...+&gt;
   }
-  if (copy_from_user(to, from, size) != 0) {
-    &lt;+... when != goto l2;
-    -EFAULT
-    ...+&gt;
-  }
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c-dev: Remove unnecessary kmalloc casts</title>
<updated>2010-08-11T16:20:54+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2010-08-11T16:20:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=35a56c5b821c1a5ab904018f322a8e45afd116f0'/>
<id>35a56c5b821c1a5ab904018f322a8e45afd116f0</id>
<content type='text'>
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c-dev: Fix all coding style issues</title>
<updated>2010-05-21T16:40:59+00:00</updated>
<author>
<name>Farid Hammane</name>
<email>farid.hammane@gmail.com</email>
</author>
<published>2010-05-21T16:40:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ae5624fc36f7b9113df56c2e9b3069fefbb7117e'/>
<id>ae5624fc36f7b9113df56c2e9b3069fefbb7117e</id>
<content type='text'>
Fix all coding style issues found by checkpatch.pl.

Signed-off-by: Farid Hammane &lt;farid.hammane@gmail.com&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix all coding style issues found by checkpatch.pl.

Signed-off-by: Farid Hammane &lt;farid.hammane@gmail.com&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c-dev: Remove unnecessary casts</title>
<updated>2010-05-21T16:40:57+00:00</updated>
<author>
<name>H Hartley Sweeten</name>
<email>hartleys@visionengravers.com</email>
</author>
<published>2010-05-21T16:40:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0be16c306125e0940c7d48ec986ac2bbdc542308'/>
<id>0be16c306125e0940c7d48ec986ac2bbdc542308</id>
<content type='text'>
The private_data member of struct file is a void *, there is no need
to cast it.

Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The private_data member of struct file is a void *, there is no need
to cast it.

Signed-off-by: H Hartley Sweeten &lt;hsweeten@visionengravers.com&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
