<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/i2c/i2c-dev.c, branch v3.2.38</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/i2c/i2c-dev.c?h=v3.2.38</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/i2c/i2c-dev.c?h=v3.2.38'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-11-23T10:33:07Z</updated>
<entry>
<title>i2c: Make i2cdev_notifier_call static</title>
<updated>2011-11-23T10:33:07Z</updated>
<author>
<name>Shubhrajyoti D</name>
<email>shubhrajyoti@ti.com</email>
</author>
<published>2011-11-23T10:33:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=eff245c82f115059648cdce95dd68bb940f2b006'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>i2c-dev: Use standard bus notification mechanism</title>
<updated>2011-03-20T13:50:52Z</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2011-03-20T13:50:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9ea3e941d161f41f920462c50e9b651cc00eccc7'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>i2c: Let i2c_parent_is_i2c_adapter return the parent adapter</title>
<updated>2010-10-24T16:16:57Z</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2010-10-24T16:16:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=97cc4d49cfcda1c2dad89c00b62a25b628ce2115'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>i2c: Multiplexed I2C bus core support</title>
<updated>2010-08-11T16:21:02Z</updated>
<author>
<name>Michael Lawnick</name>
<email>ml.lawnick@gmx.de</email>
</author>
<published>2010-08-11T16:21:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0826374bff57411d239f2fcb15da3c35af0a93cd'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>i2c-dev: Use memdup_user</title>
<updated>2010-08-11T16:20:55Z</updated>
<author>
<name>Julia Lawall</name>
<email>julia@diku.dk</email>
</author>
<published>2010-08-11T16:20:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f1c2e33c295de423db5740647bfaa5e2ad139192'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>i2c-dev: Remove unnecessary kmalloc casts</title>
<updated>2010-08-11T16:20:54Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2010-08-11T16:20:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=35a56c5b821c1a5ab904018f322a8e45afd116f0'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>i2c-dev: Fix all coding style issues</title>
<updated>2010-05-21T16:40:59Z</updated>
<author>
<name>Farid Hammane</name>
<email>farid.hammane@gmail.com</email>
</author>
<published>2010-05-21T16:40:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ae5624fc36f7b9113df56c2e9b3069fefbb7117e'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>i2c-dev: Remove unnecessary casts</title>
<updated>2010-05-21T16:40:57Z</updated>
<author>
<name>H Hartley Sweeten</name>
<email>hartleys@visionengravers.com</email>
</author>
<published>2010-05-21T16:40:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0be16c306125e0940c7d48ec986ac2bbdc542308'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>i2c: Remove big kernel lock from i2cdev_open</title>
<updated>2009-12-06T16:06:26Z</updated>
<author>
<name>Vincent Sanders</name>
<email>vince@simtec.co.uk</email>
</author>
<published>2009-12-06T16:06:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9669f54194b4df34c96478d696d9ba2b977545f5'/>
<id>urn:sha1:9669f54194b4df34c96478d696d9ba2b977545f5</id>
<content type='text'>
The BKL is held over a kmalloc so cannot protect anything beyond that.
The two calls before the kmalloc have their own locking.
Improve device open function by removing the now unnecessary ret variable

Signed-off-by: Vincent Sanders &lt;vince@simtec.co.uk&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
</entry>
<entry>
<title>i2c-dev: Clarify the unit of ioctl I2C_TIMEOUT</title>
<updated>2009-02-24T18:19:49Z</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2009-02-24T18:19:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cd97f39b7cdf1c8a9c9f52865eec795b7f0c811d'/>
<id>urn:sha1:cd97f39b7cdf1c8a9c9f52865eec795b7f0c811d</id>
<content type='text'>
The unit in which user-space can set the bus timeout value is jiffies
for historical reasons (back when HZ was always 100.) This is however
not good because user-space doesn't know how long a jiffy lasts. The
timeout value should instead be set in a fixed time unit. Given the
original value of HZ, this unit should be 10 ms, for compatibility.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Acked-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
</content>
</entry>
</feed>
