<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/base/class.c, branch v2.6.37</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.37</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.37'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2010-10-22T17:16:43Z</updated>
<entry>
<title>SYSFS: Allow boot time switching between deprecated and modern sysfs layout</title>
<updated>2010-10-22T17:16:43Z</updated>
<author>
<name>Andi Kleen</name>
<email>ak@linux.intel.com</email>
</author>
<published>2010-09-08T14:54:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e52eec13cd6b7f30ab19081b387813e03e592ae5'/>
<id>urn:sha1:e52eec13cd6b7f30ab19081b387813e03e592ae5</id>
<content type='text'>
I have some systems which need legacy sysfs due to old tools that are
making assumptions that a directory can never be a symlink to another
directory, and it's a big hazzle to compile separate kernels for them.

This patch turns CONFIG_SYSFS_DEPRECATED into a run time option
that can be switched on/off the kernel command line. This way
the same binary can be used in both cases with just a option
on the command line.

The old CONFIG_SYSFS_DEPRECATED_V2 option is still there to set
the default. I kept the weird name to not break existing
config files.

Also the compat code can be still completely disabled by undefining
CONFIG_SYSFS_DEPRECATED_SWITCH -- just the optimizer takes
care of this now instead of lots of ifdefs. This makes the code
look nicer.

v2: This is an updated version on top of Kay's patch to only
handle the block devices. I tested it on my old systems
and that seems to work.

Cc: axboe@kernel.dk
Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>driver core: remove CONFIG_SYSFS_DEPRECATED_V2 but keep it for block devices</title>
<updated>2010-10-22T17:16:43Z</updated>
<author>
<name>Kay Sievers</name>
<email>kay.sievers@vrfy.org</email>
</author>
<published>2010-09-05T05:33:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=39aba963d937edb20db7d9d93e6dda5d2adfdcdd'/>
<id>urn:sha1:39aba963d937edb20db7d9d93e6dda5d2adfdcdd</id>
<content type='text'>
This patch removes the old CONFIG_SYSFS_DEPRECATED_V2 config option,
but it keeps the logic around to handle block devices in the old manner
as some people like to run new kernel versions on old (pre 2007/2008)
distros.

Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: "James E.J. Bottomley" &lt;James.Bottomley@suse.de&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Alexey Kuznetsov &lt;kuznet@ms2.inr.ac.ru&gt;
Cc: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Jaroslav Kysela &lt;perex@perex.cz&gt;
Cc: Takashi Iwai &lt;tiwai@suse.de&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
</entry>
<entry>
<title>kobj: Add basic infrastructure for dealing with namespaces.</title>
<updated>2010-05-21T16:37:31Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2010-03-30T18:31:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bc451f2058238013e1cdf4acd443c01734d332f0'/>
<id>urn:sha1:bc451f2058238013e1cdf4acd443c01734d332f0</id>
<content type='text'>
Move complete knowledge of namespaces into the kobject layer
so we can use that information when reporting kobjects to
userspace.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<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>
</feed>
