diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-08 14:53:19 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-08 14:53:19 +0400 |
commit | bca51651fc2f197c6364c0e682f68047a7e4b444 (patch) | |
tree | 078d575803f0ebdcdd3eabebaed6a6e6911984f0 /Documentation | |
parent | 683a52a10148e929fb4844f9237f059a47c0b01b (diff) | |
parent | 906d201530f2c52aeb4eee31895c71cdccf1e9a0 (diff) | |
download | linux-bca51651fc2f197c6364c0e682f68047a7e4b444.tar.xz |
Merge tag 'driver-core-3.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core update from Greg KH:
"Here's the driver core patches for 3.18-rc1. Just a few small things,
and the addition of a new interface to dump firmware "core dumps" to
userspace through sysfs that the wireless and graphic drivers want to
use.
All of these have been in linux-next for a while"
* tag 'driver-core-3.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
dynamic_debug: change __dynamic_<foo>_dbg return types to void
driver/base/node: remove unnecessary kfree of node struct from unregister_one_node
devres: Improve devm_kasprintf()/kvasprintf() support
Documentation: devres: Add missing devm_kstrdup() managed interface
Documentation: devres: Add missing IRQ functions
firmware_class: make sure fw requests contain a name
driver core: Remove kerneldoc from local function
attribute_container: fix coding style issues
attribute_container: fix whitespace errors
drivers/base: Fix length checks in create_syslog_header()/dev_vprintk_emit()
device coredump: add new device coredump class
Documentation/sysfs-rules.txt: Add device attribute error code documentation
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/driver-model/devres.txt | 5 | ||||
-rw-r--r-- | Documentation/sysfs-rules.txt | 21 |
2 files changed, 26 insertions, 0 deletions
diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt index d14710b04439..40677443c0c5 100644 --- a/Documentation/driver-model/devres.txt +++ b/Documentation/driver-model/devres.txt @@ -281,7 +281,9 @@ IOMAP IRQ devm_free_irq() + devm_request_any_context_irq() devm_request_irq() + devm_request_threaded_irq() MDIO devm_mdiobus_alloc() @@ -291,11 +293,14 @@ MDIO MEM devm_free_pages() devm_get_free_pages() + devm_kasprintf() devm_kcalloc() devm_kfree() devm_kmalloc() devm_kmalloc_array() devm_kmemdup() + devm_kstrdup() + devm_kvasprintf() devm_kzalloc() PCI diff --git a/Documentation/sysfs-rules.txt b/Documentation/sysfs-rules.txt index a5f985ee1822..ce60ffa94d2d 100644 --- a/Documentation/sysfs-rules.txt +++ b/Documentation/sysfs-rules.txt @@ -161,3 +161,24 @@ versions of the sysfs interface. the device that matches the expected subsystem. Depending on a specific position of a parent device or exposing relative paths using "../" to access the chain of parents is a bug in the application. + +- When reading and writing sysfs device attribute files, avoid dependency + on specific error codes wherever possible. This minimizes coupling to + the error handling implementation within the kernel. + + In general, failures to read or write sysfs device attributes shall + propagate errors wherever possible. Common errors include, but are not + limited to: + + -EIO: The read or store operation is not supported, typically returned by + the sysfs system itself if the read or store pointer is NULL. + + -ENXIO: The read or store operation failed + + Error codes will not be changed without good reason, and should a change + to error codes result in user-space breakage, it will be fixed, or the + the offending change will be reverted. + + Userspace applications can, however, expect the format and contents of + the attribute files to remain consistent in the absence of a version + attribute change in the context of a given attribute. |