Skip to content

Commit

Permalink
Merge tag 'driver-core-3.3-rc1-bugfixes' of git://git.kernel.org/pub/…
Browse files Browse the repository at this point in the history
…scm/linux/kernel/git/gregkh/driver-core

Here are some patches for the 3.3-rc1 tree.

It contains the removal of the sysdev code, now that all users of it are
gone, as well as some sysfs bugfixes that have been reported by users.
There are also some documentation updates here as well.

* tag 'driver-core-3.3-rc1-bugfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  sysfs: Complain bitterly about attempts to remove files from nonexistent directories.
  stable: update documentation to ask for kernel version
  base/core.c:fix typo in comment in function device_add
  Documentation: devres: add allocation functions to list of supported calls
  Documentation update for the driver model core
  kernel-doc: fix new warnings in driver-core
  kernel-doc: fix new warnings in debugfs
  kernel-doc: fix new warnings in device.h
  driver core: remove drivers/base/sys.c and include/linux/sysdev.h
  • Loading branch information
torvalds committed Jan 29, 2012
2 parents e3b8369 + ce59791 commit 0a96265
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 551 deletions.
4 changes: 4 additions & 0 deletions Documentation/driver-model/devres.txt
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ certainly invest a bit more effort into libata core layer).
6. List of managed interfaces
-----------------------------

MEM
devm_kzalloc()
devm_kfree()

IO region
devm_request_region()
devm_request_mem_region()
Expand Down
3 changes: 2 additions & 1 deletion Documentation/stable_kernel_rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ Procedure for submitting patches to the -stable tree:

- Send the patch, after verifying that it follows the above rules, to
[email protected]. You must note the upstream commit ID in the
changelog of your submission.
changelog of your submission, as well as the kernel version you wish
it to be applied to.
- To have the patch automatically included in the stable tree, add the tag
Cc: [email protected]
in the sign-off area. Once the patch is merged it will be applied to
Expand Down
2 changes: 1 addition & 1 deletion drivers/base/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Makefile for the Linux device tree

obj-y := core.o sys.o bus.o dd.o syscore.o \
obj-y := core.o bus.o dd.o syscore.o \
driver.o class.o platform.o \
cpu.o firmware.o init.o map.o devres.o \
attribute_container.o transport_class.o \
Expand Down
17 changes: 16 additions & 1 deletion drivers/base/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,11 @@ static void klist_children_put(struct klist_node *n)
* may be used for reference counting of @dev after calling this
* function.
*
* All fields in @dev must be initialized by the caller to 0, except
* for those explicitly set to some other value. The simplest
* approach is to use kzalloc() to allocate the structure containing
* @dev.
*
* NOTE: Use put_device() to give up your reference instead of freeing
* @dev directly once you have called this function.
*/
Expand Down Expand Up @@ -930,6 +935,13 @@ int device_private_init(struct device *dev)
* to the global and sibling lists for the device, then
* adds it to the other relevant subsystems of the driver model.
*
* Do not call this routine or device_register() more than once for
* any device structure. The driver model core is not designed to work
* with devices that get unregistered and then spring back to life.
* (Among other things, it's very hard to guarantee that all references
* to the previous incarnation of @dev have been dropped.) Allocate
* and register a fresh new struct device instead.
*
* NOTE: _Never_ directly free @dev after calling this function, even
* if it returned an error! Always use put_device() to give up your
* reference instead.
Expand Down Expand Up @@ -1022,7 +1034,7 @@ int device_add(struct device *dev)
device_pm_add(dev);

/* Notify clients of device addition. This call must come
* after dpm_sysf_add() and before kobject_uevent().
* after dpm_sysfs_add() and before kobject_uevent().
*/
if (dev->bus)
blocking_notifier_call_chain(&dev->bus->p->bus_notifier,
Expand Down Expand Up @@ -1090,6 +1102,9 @@ int device_add(struct device *dev)
* have a clearly defined need to use and refcount the device
* before it is added to the hierarchy.
*
* For more information, see the kerneldoc for device_initialize()
* and device_add().
*
* NOTE: _Never_ directly free @dev after calling this function, even
* if it returned an error! Always use put_device() to give up the
* reference initialized in this function instead.
Expand Down
Loading

0 comments on commit 0a96265

Please sign in to comment.