<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/base/core.c, branch v2.6.28</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.28</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.28'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2008-10-16T16:24:52Z</updated>
<entry>
<title>kobject: Fix kobject_rename and !CONFIG_SYSFS</title>
<updated>2008-10-16T16:24:52Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2008-05-08T21:41:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=030c1d2bfcc2187650fb975456ca0b61a5bb77f4'/>
<id>urn:sha1:030c1d2bfcc2187650fb975456ca0b61a5bb77f4</id>
<content type='text'>
When looking at kobject_rename I found two bugs with
that exist when sysfs support is disabled in the kernel.

kobject_rename does not change the name on the kobject when
sysfs support is not compiled in.

kobject_rename without locking attempts to check the
validity of a rename operation, which the kobject layer
simply does not have the infrastructure to do.

This patch documents the previously unstated requirement of
kobject_rename that is the responsibility of the caller to
provide mutual exclusion and to be certain that the new_name
for the kobject is valid.

This patch modifies sysfs_rename_dir in !CONFIG_SYSFS case
to call kobject_set_name to actually change the kobject_name.

This patch removes the bogus and misleading check in kobject_rename
that attempts to see if a rename is valid.  The check is bogus
because we do not have the proper locking.  The check is misleading
because it looks like we can and do perform checking at the kobject
level that we don't.

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: Fix cleanup in device_create_vargs().</title>
<updated>2008-10-16T16:24:49Z</updated>
<author>
<name>Cornelia Huck</name>
<email>cornelia.huck@de.ibm.com</email>
</author>
<published>2008-09-03T16:26:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=286661b3777897220ecfcd774bccc68a34667f39'/>
<id>urn:sha1:286661b3777897220ecfcd774bccc68a34667f39</id>
<content type='text'>
If device_register() in device_create_vargs() fails, the device
must be cleaned up with put_device() (which is also fine on NULL)
instead of kfree().

Signed-off-by: Cornelia Huck &lt;cornelia.huck@de.ibm.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: Clarify device cleanup.</title>
<updated>2008-10-16T16:24:48Z</updated>
<author>
<name>Cornelia Huck</name>
<email>cornelia.huck@de.ibm.com</email>
</author>
<published>2008-09-03T16:26:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5739411acbaa63a6c22c91e340fdcdbcc7d82a51'/>
<id>urn:sha1:5739411acbaa63a6c22c91e340fdcdbcc7d82a51</id>
<content type='text'>
Make the comments on how to use device_initialize(), device_add()
and device_register() a bit clearer - in particular, explicitly
note that put_device() must be used once we tried to add the device
to the hierarchy.

Signed-off-by: Cornelia Huck &lt;cornelia.huck@de.ibm.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: 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 core: add init_name to struct device</title>
<updated>2008-08-21T17:15:37Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2008-05-30T17:45:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c906a48adc74fc455378137ac5124b13e7030a15'/>
<id>urn:sha1:c906a48adc74fc455378137ac5124b13e7030a15</id>
<content type='text'>
This gives us a way to handle both the bus_id and init_name values being
used for a while during the transition period.

Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>PM: don't skip device PM init when CONFIG_PM_SLEEP isn't set and CONFIG_PM is set</title>
<updated>2008-08-21T17:15:36Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2008-08-07T17:06:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3b98aeaf3a75f544dc945694f4fcf6e1c4bab89d'/>
<id>urn:sha1:3b98aeaf3a75f544dc945694f4fcf6e1c4bab89d</id>
<content type='text'>
This patch (as1124) fixes a couple of bugs in the PM core.  The new
dev-&gt;power.status field should be initialized regardless of whether
CONFIG_PM_SLEEP is enabled, and similarly dpm_sysfs_add() should be
called whenever CONFIG_PM is enabled.

The patch separates out the call to dpm_sysfs_add() from the call to
device_pm_add().  As a result device_pm_add() can no longer return an
error, so its return type is changed to void.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Tested-by: Romit Dasgupta &lt;romit@ti.com&gt;
Acked-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>dev_printk(): constify the `dev' argument</title>
<updated>2008-08-21T17:15:36Z</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2008-07-30T19:29:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bf9ca69fc8d19d4034391d3df4c35dccdef9d28c'/>
<id>urn:sha1:bf9ca69fc8d19d4034391d3df4c35dccdef9d28c</id>
<content type='text'>
Add const markings to dev_name and dev_driver_string to make it clear that
dev_printk doesn't modify dev.  This is a prerequisite to adding more
const markings to other functions make it clearer, which functions can
modify dev and which can't.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Use WARN() in drivers/base/</title>
<updated>2008-07-26T19:00:07Z</updated>
<author>
<name>Arjan van de Ven</name>
<email>arjan@linux.intel.com</email>
</author>
<published>2008-07-26T02:45:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f810a5cf28a818db96333cd23646f0227ec015b4'/>
<id>urn:sha1:f810a5cf28a818db96333cd23646f0227ec015b4</id>
<content type='text'>
Use WARN() instead of a printk+WARN_ON() pair; this way the message
becomes part of the warning section for better reporting/collection.

Signed-off-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>driver core: Suppress sysfs warnings for device_rename().</title>
<updated>2008-07-22T04:55:01Z</updated>
<author>
<name>Cornelia Huck</name>
<email>cornelia.huck@de.ibm.com</email>
</author>
<published>2008-06-10T09:09:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=36ce6dad6e3cb3f050ed41e0beac0070d2062b25'/>
<id>urn:sha1:36ce6dad6e3cb3f050ed41e0beac0070d2062b25</id>
<content type='text'>
driver core: Suppress sysfs warnings for device_rename().

Renaming network devices to an already existing name is not
something we want sysfs to print a scary warning for, since the
callers can deal with this correctly. So let's introduce
sysfs_create_link_nowarn() which gets rid of the common warning.

Signed-off-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&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>
