diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-05 04:27:46 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-05 04:27:46 +0300 |
commit | 0be75179df5e20306528800fc7c6a504b12b97db (patch) | |
tree | 726e88308f0a08384523bcb542bda510ca723748 /drivers | |
parent | 8f28472a739e8e39adc6e64ee5b460df039f0e4f (diff) | |
parent | 523aa3586ffb1fc11a9bf88f77ebaf71a15eb998 (diff) | |
download | linux-0be75179df5e20306528800fc7c6a504b12b97db.tar.xz |
Merge tag 'driver-core-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg KH:
"Very tiny pull request for 4.12-rc1 for the driver core this time
around.
There are some documentation fixes, an eventpoll.h fixup to make it
easier for the libc developers to take our header files directly, and
some very minor driver core fixes and changes.
All have been in linux-next for a very long time with no reported
issues"
* tag 'driver-core-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
Revert "kref: double kref_put() in my_data_handler()"
driver core: don't initialize 'parent' in device_add()
drivers: base: dma-mapping: use nth_page helper
Documentation/ABI: add information about cpu_capacity
debugfs: set no_llseek in DEFINE_DEBUGFS_ATTRIBUTE
eventpoll.h: add missing epoll event masks
eventpoll.h: fix epoll event masks
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/core.c | 2 | ||||
-rw-r--r-- | drivers/base/dma-mapping.c | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index 6bb60fb6a30b..bbecaf9293be 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -1607,7 +1607,7 @@ int device_private_init(struct device *dev) */ int device_add(struct device *dev) { - struct device *parent = NULL; + struct device *parent; struct kobject *kobj; struct class_interface *class_intf; int error = -EINVAL; diff --git a/drivers/base/dma-mapping.c b/drivers/base/dma-mapping.c index efd71cf4fdea..51b7061ff7c0 100644 --- a/drivers/base/dma-mapping.c +++ b/drivers/base/dma-mapping.c @@ -309,14 +309,13 @@ void *dma_common_contiguous_remap(struct page *page, size_t size, int i; struct page **pages; void *ptr; - unsigned long pfn; pages = kmalloc(sizeof(struct page *) << get_order(size), GFP_KERNEL); if (!pages) return NULL; - for (i = 0, pfn = page_to_pfn(page); i < (size >> PAGE_SHIFT); i++) - pages[i] = pfn_to_page(pfn + i); + for (i = 0; i < (size >> PAGE_SHIFT); i++) + pages[i] = nth_page(page, i); ptr = dma_common_pages_remap(pages, size, vm_flags, prot, caller); |