diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-13 20:17:32 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-13 20:17:32 -0400 |
| commit | c4be50eee2bd4d50e0f0ca58776f685c08de69c3 (patch) | |
| tree | 819da448b2916a293e5c600c95d72db83ec77017 | |
| parent | 42e3a58b028e0e51746f596a11abfec01cd1c5c4 (diff) | |
| parent | c9e15f25f514a76d906be01e621f400cdee94558 (diff) | |
Merge tag 'driver-core-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg KH:
"Here's the driver-core / kobject / lz4 tree update for 4.1-rc1.
Everything here has been in linux-next for a while with no reported
issues. It's mostly just coding style cleanups, with other minor
changes in here as well, nothing big"
* tag 'driver-core-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (32 commits)
debugfs: allow bad parent pointers to be passed in
stable_kernel_rules: Add clause about specification of kernel versions to patch.
kobject: WARN as tip when call kobject_get() to a kobject not initialized
lib/lz4: Pull out constant tables
drivers: platform: parse IRQ flags from resources
driver core: Make probe deferral more quiet
drivers/core/of: Add symlink to device-tree from devices with an OF node
device: Add dev_of_node() accessor
drivers: base: fw: fix ret value when loading fw
firmware: Avoid manual device_create_file() calls
drivers/base: cacheinfo: validate device node for all the caches
drivers/base: use tabs where possible in code indentation
driver core: add missing blank line after declaration
drivers: base: node: Delete space after pointer declaration
drivers: base: memory: Use tabs instead of spaces
firmware_class: Fix whitespace and indentation
drivers: base: dma-mapping: Erase blank space after pointer
drivers: base: class: Add a blank line after declarations
attribute_container: fix missing blank lines after declarations
drivers: base: memory: Fix switch indent
...
| -rw-r--r-- | Documentation/ABI/stable/sysfs-devices | 10 | ||||
| -rw-r--r-- | Documentation/stable_kernel_rules.txt | 10 | ||||
| -rw-r--r-- | drivers/base/attribute_container.c | 2 | ||||
| -rw-r--r-- | drivers/base/bus.c | 4 | ||||
| -rw-r--r-- | drivers/base/cacheinfo.c | 13 | ||||
| -rw-r--r-- | drivers/base/class.c | 2 | ||||
| -rw-r--r-- | drivers/base/core.c | 19 | ||||
| -rw-r--r-- | drivers/base/dd.c | 16 | ||||
| -rw-r--r-- | drivers/base/dma-mapping.c | 2 | ||||
| -rw-r--r-- | drivers/base/driver.c | 1 | ||||
| -rw-r--r-- | drivers/base/firmware_class.c | 49 | ||||
| -rw-r--r-- | drivers/base/map.c | 3 | ||||
| -rw-r--r-- | drivers/base/memory.c | 58 | ||||
| -rw-r--r-- | drivers/base/node.c | 28 | ||||
| -rw-r--r-- | drivers/base/platform.c | 9 | ||||
| -rw-r--r-- | drivers/base/property.c | 2 | ||||
| -rw-r--r-- | drivers/base/soc.c | 10 | ||||
| -rw-r--r-- | fs/debugfs/inode.c | 3 | ||||
| -rw-r--r-- | fs/sysfs/group.c | 11 | ||||
| -rw-r--r-- | include/linux/device.h | 7 | ||||
| -rw-r--r-- | include/linux/sysfs.h | 15 | ||||
| -rw-r--r-- | lib/kobject.c | 7 | ||||
| -rw-r--r-- | lib/lz4/lz4_decompress.c | 18 | ||||
| -rw-r--r-- | samples/kobject/kobject-example.c | 16 | ||||
| -rw-r--r-- | samples/kobject/kset-example.c | 16 |
25 files changed, 219 insertions, 112 deletions
diff --git a/Documentation/ABI/stable/sysfs-devices b/Documentation/ABI/stable/sysfs-devices new file mode 100644 index 000000000000..43f78b88da28 --- /dev/null +++ b/Documentation/ABI/stable/sysfs-devices | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | # Note: This documents additional properties of any device beyond what | ||
| 2 | # is documented in Documentation/sysfs-rules.txt | ||
| 3 | |||
| 4 | What: /sys/devices/*/of_path | ||
| 5 | Date: February 2015 | ||
| 6 | Contact: Device Tree mailing list <devicetree@vger.kernel.org> | ||
| 7 | Description: | ||
| 8 | Any device associated with a device-tree node will have | ||
| 9 | an of_path symlink pointing to the corresponding device | ||
| 10 | node in /sys/firmware/devicetree/ | ||
diff --git a/Documentation/stable_kernel_rules.txt b/Documentation/stable_kernel_rules.txt index 02f8331edb8b..58d0ac4df946 100644 --- a/Documentation/stable_kernel_rules.txt +++ b/Documentation/stable_kernel_rules.txt | |||
| @@ -81,6 +81,16 @@ format in the sign-off area: | |||
| 81 | git cherry-pick fd21073 | 81 | git cherry-pick fd21073 |
| 82 | git cherry-pick <this commit> | 82 | git cherry-pick <this commit> |
| 83 | 83 | ||
| 84 | Also, some patches may have kernel version prerequisites. This can be | ||
| 85 | specified in the following format in the sign-off area: | ||
| 86 | |||
| 87 | Cc: <stable@vger.kernel.org> # 3.3.x- | ||
| 88 | |||
| 89 | The tag has the meaning of: | ||
| 90 | git cherry-pick <this commit> | ||
| 91 | |||
| 92 | For each "-stable" tree starting with the specified version. | ||
| 93 | |||
| 84 | Following the submission: | 94 | Following the submission: |
| 85 | 95 | ||
| 86 | - The sender will receive an ACK when the patch has been accepted into the | 96 | - The sender will receive an ACK when the patch has been accepted into the |
diff --git a/drivers/base/attribute_container.c b/drivers/base/attribute_container.c index 3ead3af4be61..2ba4cac080c5 100644 --- a/drivers/base/attribute_container.c +++ b/drivers/base/attribute_container.c | |||
| @@ -94,6 +94,7 @@ int | |||
| 94 | attribute_container_unregister(struct attribute_container *cont) | 94 | attribute_container_unregister(struct attribute_container *cont) |
| 95 | { | 95 | { |
| 96 | int retval = -EBUSY; | 96 | int retval = -EBUSY; |
| 97 | |||
| 97 | mutex_lock(&attribute_container_mutex); | 98 | mutex_lock(&attribute_container_mutex); |
| 98 | spin_lock(&cont->containers.k_lock); | 99 | spin_lock(&cont->containers.k_lock); |
| 99 | if (!list_empty(&cont->containers.k_list)) | 100 | if (!list_empty(&cont->containers.k_list)) |
| @@ -349,6 +350,7 @@ int | |||
| 349 | attribute_container_add_class_device(struct device *classdev) | 350 | attribute_container_add_class_device(struct device *classdev) |
| 350 | { | 351 | { |
| 351 | int error = device_add(classdev); | 352 | int error = device_add(classdev); |
| 353 | |||
| 352 | if (error) | 354 | if (error) |
| 353 | return error; | 355 | return error; |
| 354 | return attribute_container_add_attrs(classdev); | 356 | return attribute_container_add_attrs(classdev); |
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 876bae5ade33..79bc203f51ef 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c | |||
| @@ -515,11 +515,11 @@ int bus_add_device(struct device *dev) | |||
| 515 | goto out_put; | 515 | goto out_put; |
| 516 | error = device_add_groups(dev, bus->dev_groups); | 516 | error = device_add_groups(dev, bus->dev_groups); |
| 517 | if (error) | 517 | if (error) |
| 518 | goto out_groups; | 518 | goto out_id; |
| 519 | error = sysfs_create_link(&bus->p->devices_kset->kobj, | 519 | error = sysfs_create_link(&bus->p->devices_kset->kobj, |
| 520 | &dev->kobj, dev_name(dev)); | 520 | &dev->kobj, dev_name(dev)); |
| 521 | if (error) | 521 | if (error) |
| 522 | goto out_id; | 522 | goto out_groups; |
| 523 | error = sysfs_create_link(&dev->kobj, | 523 | error = sysfs_create_link(&dev->kobj, |
| 524 | &dev->bus->p->subsys.kobj, "subsystem"); | 524 | &dev->bus->p->subsys.kobj, "subsystem"); |
| 525 | if (error) | 525 | if (error) |
diff --git a/drivers/base/cacheinfo.c b/drivers/base/cacheinfo.c index 6e64563361f0..9c2ba1c97c42 100644 --- a/drivers/base/cacheinfo.c +++ b/drivers/base/cacheinfo.c | |||
| @@ -62,15 +62,21 @@ static int cache_setup_of_node(unsigned int cpu) | |||
| 62 | return -ENOENT; | 62 | return -ENOENT; |
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | while (np && index < cache_leaves(cpu)) { | 65 | while (index < cache_leaves(cpu)) { |
| 66 | this_leaf = this_cpu_ci->info_list + index; | 66 | this_leaf = this_cpu_ci->info_list + index; |
| 67 | if (this_leaf->level != 1) | 67 | if (this_leaf->level != 1) |
| 68 | np = of_find_next_cache_node(np); | 68 | np = of_find_next_cache_node(np); |
| 69 | else | 69 | else |
| 70 | np = of_node_get(np);/* cpu node itself */ | 70 | np = of_node_get(np);/* cpu node itself */ |
| 71 | if (!np) | ||
| 72 | break; | ||
| 71 | this_leaf->of_node = np; | 73 | this_leaf->of_node = np; |
| 72 | index++; | 74 | index++; |
| 73 | } | 75 | } |
| 76 | |||
| 77 | if (index != cache_leaves(cpu)) /* not all OF nodes populated */ | ||
| 78 | return -ENOENT; | ||
| 79 | |||
| 74 | return 0; | 80 | return 0; |
| 75 | } | 81 | } |
| 76 | 82 | ||
| @@ -189,8 +195,11 @@ static int detect_cache_attributes(unsigned int cpu) | |||
| 189 | * will be set up here only if they are not populated already | 195 | * will be set up here only if they are not populated already |
| 190 | */ | 196 | */ |
| 191 | ret = cache_shared_cpu_map_setup(cpu); | 197 | ret = cache_shared_cpu_map_setup(cpu); |
| 192 | if (ret) | 198 | if (ret) { |
| 199 | pr_warn("Unable to detect cache hierarcy from DT for CPU %d\n", | ||
| 200 | cpu); | ||
| 193 | goto free_ci; | 201 | goto free_ci; |
| 202 | } | ||
| 194 | return 0; | 203 | return 0; |
| 195 | 204 | ||
| 196 | free_ci: | 205 | free_ci: |
diff --git a/drivers/base/class.c b/drivers/base/class.c index f96f70419a78..6e810881e48b 100644 --- a/drivers/base/class.c +++ b/drivers/base/class.c | |||
| @@ -90,6 +90,7 @@ int class_create_file_ns(struct class *cls, const struct class_attribute *attr, | |||
| 90 | const void *ns) | 90 | const void *ns) |
| 91 | { | 91 | { |
| 92 | int error; | 92 | int error; |
| 93 | |||
| 93 | if (cls) | 94 | if (cls) |
| 94 | error = sysfs_create_file_ns(&cls->p->subsys.kobj, | 95 | error = sysfs_create_file_ns(&cls->p->subsys.kobj, |
| 95 | &attr->attr, ns); | 96 | &attr->attr, ns); |
| @@ -488,6 +489,7 @@ ssize_t show_class_attr_string(struct class *class, | |||
| 488 | struct class_attribute *attr, char *buf) | 489 | struct class_attribute *attr, char *buf) |
| 489 | { | 490 | { |
| 490 | struct class_attribute_string *cs; | 491 | struct class_attribute_string *cs; |
| 492 | |||
| 491 | cs = container_of(attr, struct class_attribute_string, attr); | 493 | cs = container_of(attr, struct class_attribute_string, attr); |
| 492 | return snprintf(buf, PAGE_SIZE, "%s\n", cs->str); | 494 | return snprintf(buf, PAGE_SIZE, "%s\n", cs->str); |
| 493 | } | 495 | } |
diff --git a/drivers/base/core.c b/drivers/base/core.c index 07304a3b9ee2..cadf165651d8 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
| @@ -805,8 +805,16 @@ static void cleanup_device_parent(struct device *dev) | |||
