<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/base/class.c, branch v2.6.34</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.34</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.34'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2010-03-19T14:12:21Z</updated>
<entry>
<title>driver-core: document ERR_PTR() return values</title>
<updated>2010-03-19T14:12:21Z</updated>
<author>
<name>Jani Nikula</name>
<email>ext-jani.1.nikula@nokia.com</email>
</author>
<published>2010-03-11T16:11:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f0eae0ed3b7d4182a6b4dd03540a738518ea3163'/>
<id>urn:sha1:f0eae0ed3b7d4182a6b4dd03540a738518ea3163</id>
<content type='text'>
A number of functions in the driver core return ERR_PTR() values on
error. Document this in the kernel-doc of the functions.

Signed-off-by: Jani Nikula &lt;ext-jani.1.nikula@nokia.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Driver core: Constify struct sysfs_ops in struct kobj_type</title>
<updated>2010-03-08T01:04:49Z</updated>
<author>
<name>Emese Revfy</name>
<email>re.emese@gmail.com</email>
</author>
<published>2010-01-19T01:58:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=52cf25d0ab7f78eeecc59ac652ed5090f69b619e'/>
<id>urn:sha1:52cf25d0ab7f78eeecc59ac652ed5090f69b619e</id>
<content type='text'>
Constify struct sysfs_ops.

This is part of the ops structure constification
effort started by Arjan van de Ven et al.

Benefits of this constification:

 * prevents modification of data that is shared
   (referenced) by many other structure instances
   at runtime

 * detects/prevents accidental (but not intentional)
   modification attempts on archs that enforce
   read-only kernel data at runtime

 * potentially better optimized code as the compiler
   can assume that the const data cannot be changed

 * the compiler/linker move const data into .rodata
   and therefore exclude them from false sharing

Signed-off-by: Emese Revfy &lt;re.emese@gmail.com&gt;
Acked-by: David Teigland &lt;teigland@redhat.com&gt;
Acked-by: Matt Domsch &lt;Matt_Domsch@dell.com&gt;
Acked-by: Maciej Sosnowski &lt;maciej.sosnowski@intel.com&gt;
Acked-by: Hans J. Koch &lt;hjk@linutronix.de&gt;
Acked-by: Pekka Enberg &lt;penberg@cs.helsinki.fi&gt;
Acked-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Acked-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>driver core: Add class_attr_string for simple read-only string</title>
<updated>2010-03-08T01:04:48Z</updated>
<author>
<name>Andi Kleen</name>
<email>andi@firstfloor.org</email>
</author>
<published>2010-01-05T11:48:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=869dfc875e32fd832385fd52ce54525a10401ed6'/>
<id>urn:sha1:869dfc875e32fd832385fd52ce54525a10401ed6</id>
<content type='text'>
Several drivers just export a static string as class attributes.

Use the new extensible attribute support to define a simple
CLASS_ATTR_STRING() macro for this.

This will allow to remove code from drivers in followon patches.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>driver-core: Add attribute argument to class_attribute show/store</title>
<updated>2010-03-08T01:04:48Z</updated>
<author>
<name>Andi Kleen</name>
<email>andi@firstfloor.org</email>
</author>
<published>2010-01-05T11:48:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=28812fe11a21826ba4c97c6c7971a619987cd912'/>
<id>urn:sha1:28812fe11a21826ba4c97c6c7971a619987cd912</id>
<content type='text'>
Passing the attribute to the low level IO functions allows all kinds
of cleanups, by sharing low level IO code without requiring
an own function for every piece of data.

Also drivers can extend the attributes with own data fields
and use that in the low level function.

This makes the class attributes the same as sysdev_class attributes
and plain attributes.

This will allow further cleanups in drivers.

Full tree sweep converting all users.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>class: Free the class private data in class_release</title>
<updated>2010-02-16T23:43:00Z</updated>
<author>
<name>Laurent Pinchart</name>
<email>laurent.pinchart@ideasonboard.com</email>
</author>
<published>2010-02-10T12:32:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=18d19c96457d172d913510c083bc7411ed40cb10'/>
<id>urn:sha1:18d19c96457d172d913510c083bc7411ed40cb10</id>
<content type='text'>
Fix a memory leak by freeing the memory allocated in __class_register
for the class private data.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Acked-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>Driver core: Add support for compatibility classes</title>
<updated>2009-09-15T16:50:48Z</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2009-08-04T10:55:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4622709445705c1e423d2addcfd8ccae052fe0ba'/>
<id>urn:sha1:4622709445705c1e423d2addcfd8ccae052fe0ba</id>
<content type='text'>
When turning class devices into bus devices, we may need to
temporarily add links in sysfs so that user-space applications
are not confused. This is done by adding the following API:

* Functions to register and unregister compatibility classes.
  These appear in sysfs at the same location as regular classes, but
  instead of class devices, they contain links to bus devices.
* Functions to create and delete such links. Additionally, the caller
  can optionally pass a target device to which a "device" link should
  point (typically that would be the device's parent), to fully emulate
  the original class device.

The i2c subsystem will be the first user of this API, as i2c adapters
are being converted from class devices to bus devices.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;

</content>
</entry>
<entry>
<title>driver-core: use klist for class device list and implement iterator</title>
<updated>2008-10-09T06:56:04Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2008-08-25T17:50:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5a3ceb861663040f9ef0176df4aaa494bba5e352'/>
<id>urn:sha1:5a3ceb861663040f9ef0176df4aaa494bba5e352</id>
<content type='text'>
Iterating over entries using callback usually isn't too fun especially
when the entry being iterated over can't be manipulated freely.  This
patch converts class-&gt;p-&gt;class_devices to klist and implements class
device iterator so that the users can freely build their own control
structure.  The users are also free to call back into class code
without worrying about locking.

class_for_each_device() and class_find_device() are converted to use
the new iterators, so their users don't have to worry about locking
anymore either.

Note: This depends on klist-dont-iterate-over-deleted-entries patch
because class_intf-&gt;add/remove_dev() depends on proper synchronization
with device removal.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Cc: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>driver model: anti-oopsing medicine</title>
<updated>2008-08-21T17:15:36Z</updated>
<author>
<name>David Brownell</name>
<email>dbrownell@users.sourceforge.net</email>
</author>
<published>2008-08-07T01:52:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7c2250352e11bf956c4cfa20b01ae6ba72882788'/>
<id>urn:sha1:7c2250352e11bf956c4cfa20b01ae6ba72882788</id>
<content type='text'>
Anti-oops medicine for the class iterators ... the oops was
observed when a class was implicitly referenced before it
was initialized.

[Modified by Greg to spit a warning back so someone knows to fix their code]

Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>locking: fix mutex @key parameter kernel-doc notation</title>
<updated>2008-07-28T16:12:36Z</updated>
<author>
<name>Randy Dunlap</name>
<email>randy.dunlap@oracle.com</email>
</author>
<published>2008-07-24T23:58:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0e241ffd306c0896bb9959be7faa4d4cfcb706d9'/>
<id>urn:sha1:0e241ffd306c0896bb9959be7faa4d4cfcb706d9</id>
<content type='text'>
Fix @key parameter to mutex_init() and one of its callers.

Warning(linux-2.6.26-git11//drivers/base/class.c:210): No description found for parameter 'key'

Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>class: change internal semaphore to a mutex</title>
<updated>2008-07-22T04:54:52Z</updated>
<author>
<name>Dave Young</name>
<email>hidave.darkstar@gmail.com</email>
</author>
<published>2008-05-28T16:28:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f75b1c60fc1e53c4004a79ea0be071aa3318cdcc'/>
<id>urn:sha1:f75b1c60fc1e53c4004a79ea0be071aa3318cdcc</id>
<content type='text'>
Now that the lockdep infrastructure in the class core is in place, we
should be able to properly change the internal class semaphore to be a
mutex.

David wrote the original patch, and Greg fixed it up to apply properly
due to all of the recent changes in this area.

From: Dave Young &lt;hidave.darkstar@gmail.com&gt;
Cc: Matthew Wilcox &lt;matthew@wil.cx&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
</feed>
