diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-14 19:10:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-14 19:10:09 -0500 |
commit | e6b5be2be4e30037eb551e0ed09dd97bd00d85d3 (patch) | |
tree | 88801365987a0dc64d62d47e8a11f3b44691c37f /lib | |
parent | 37da7bbbe84fe9e8862940d3f9194fd27dce59bb (diff) | |
parent | f1c488a78d9f1a22cdb15648c15e70fd82ed229a (diff) |
Merge tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core update from Greg KH:
"Here's the set of driver core patches for 3.19-rc1.
They are dominated by the removal of the .owner field in platform
drivers. They touch a lot of files, but they are "simple" changes,
just removing a line in a structure.
Other than that, a few minor driver core and debugfs changes. There
are some ath9k patches coming in through this tree that have been
acked by the wireless maintainers as they relied on the debugfs
changes.
Everything has been in linux-next for a while"
* tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
fs: debugfs: add forward declaration for struct device type
firmware class: Deletion of an unnecessary check before the function call "vunmap"
firmware loader: fix hung task warning dump
devcoredump: provide a one-way disable function
device: Add dev_<level>_once variants
ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
ath: use seq_file api for ath9k debugfs files
debugfs: add helper function to create device related seq_file
drivers/base: cacheinfo: remove noisy error boot message
Revert "core: platform: add warning if driver has no owner"
drivers: base: support cpu cache information interface to userspace via sysfs
drivers: base: add cpu_device_create to support per-cpu devices
topology: replace custom attribute macros with standard DEVICE_ATTR*
cpumask: factor out show_cpumap into separate helper function
driver core: Fix unbalanced device reference in drivers_probe
driver core: fix race with userland in device_add()
sysfs/kernfs: make read requests on pre-alloc files use the buffer.
sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
fs: sysfs: return EGBIG on write if offset is larger than file size
...
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bitmap.c | 29 | ||||
-rw-r--r-- | lib/kobject.c | 2 |
2 files changed, 30 insertions, 1 deletions
diff --git a/lib/bitmap.c b/lib/bitmap.c index 969ae8fbc85b..324ea9eab8c1 100644 --- a/lib/bitmap.c +++ b/lib/bitmap.c | |||
@@ -12,6 +12,8 @@ | |||
12 | #include <linux/bitmap.h> | 12 | #include <linux/bitmap.h> |
13 | #include <linux/bitops.h> | 13 | #include <linux/bitops.h> |
14 | #include <linux/bug.h> | 14 | #include <linux/bug.h> |
15 | |||
16 | #include <asm/page.h> | ||
15 | #include <asm/uaccess.h> | 17 | #include <asm/uaccess.h> |
16 | 18 | ||
17 | /* | 19 | /* |
@@ -586,6 +588,33 @@ int bitmap_scnlistprintf(char *buf, unsigned int buflen, | |||
586 | EXPORT_SYMBOL(bitmap_scnlistprintf); | 588 | EXPORT_SYMBOL(bitmap_scnlistprintf); |
587 | 589 | ||
588 | /** | 590 | /** |
591 | * bitmap_print_to_pagebuf - convert bitmap to list or hex format ASCII string | ||
592 | * @list: indicates whether the bitmap must be list | ||
593 | * @buf: page aligned buffer into which string is placed | ||
594 | * @maskp: pointer to bitmap to convert | ||
595 | * @nmaskbits: size of bitmap, in bits | ||
596 | * | ||
597 | * Output format is a comma-separated list of decimal numbers and | ||
598 | * ranges if list is specified or hex digits grouped into comma-separated | ||
599 | * sets of 8 digits/set. Returns the number of characters written to buf. | ||
600 | */ | ||
601 | int bitmap_print_to_pagebuf(bool list, char *buf, const unsigned long *maskp, | ||
602 | int nmaskbits) | ||
603 | { | ||
604 | ptrdiff_t len = PTR_ALIGN(buf + PAGE_SIZE - 1, PAGE_SIZE) - buf - 2; | ||
605 | int n = 0; | ||
606 | |||
607 | if (len > 1) { | ||
608 | n = list ? bitmap_scnlistprintf(buf, len, maskp, nmaskbits) : | ||
609 | bitmap_scnprintf(buf, len, maskp, nmaskbits); | ||
610 | buf[n++] = '\n'; | ||
611 | buf[n] = '\0'; | ||
612 | } | ||
613 | return n; | ||
614 | } | ||
615 | EXPORT_SYMBOL(bitmap_print_to_pagebuf); | ||
616 | |||
617 | /** | ||
589 | * __bitmap_parselist - convert list format ASCII string to bitmap | 618 | * __bitmap_parselist - convert list format ASCII string to bitmap |
590 | * @buf: read nul-terminated user string from this buffer | 619 | * @buf: read nul-terminated user string from this buffer |
591 | * @buflen: buffer size in bytes. If string is smaller than this | 620 | * @buflen: buffer size in bytes. If string is smaller than this |
diff --git a/lib/kobject.c b/lib/kobject.c index 58751bb80a7c..03d4ab349fa7 100644 --- a/lib/kobject.c +++ b/lib/kobject.c | |||
@@ -976,7 +976,7 @@ const struct kobj_ns_type_operations *kobj_child_ns_ops(struct kobject *parent) | |||
976 | { | 976 | { |
977 | const struct kobj_ns_type_operations *ops = NULL; | 977 | const struct kobj_ns_type_operations *ops = NULL; |
978 | 978 | ||
979 | if (parent && parent->ktype->child_ns_type) | 979 | if (parent && parent->ktype && parent->ktype->child_ns_type) |
980 | ops = parent->ktype->child_ns_type(parent); | 980 | ops = parent->ktype->child_ns_type(parent); |
981 | 981 | ||
982 | return ops; | 982 | return ops; |