Commit 0be75179 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'driver-core-4.12-rc1' of...

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
parents 8f28472a 523aa358
...@@ -366,3 +366,10 @@ Contact: Linux ARM Kernel Mailing list <linux-arm-kernel@lists.infradead.org> ...@@ -366,3 +366,10 @@ Contact: Linux ARM Kernel Mailing list <linux-arm-kernel@lists.infradead.org>
Description: AArch64 CPU registers Description: AArch64 CPU registers
'identification' directory exposes the CPU ID registers for 'identification' directory exposes the CPU ID registers for
identifying model and revision of the CPU. identifying model and revision of the CPU.
What: /sys/devices/system/cpu/cpu#/cpu_capacity
Date: December 2016
Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
Description: information about CPUs heterogeneity.
cpu_capacity: capacity of cpu#.
...@@ -84,6 +84,7 @@ int my_data_handler(void) ...@@ -84,6 +84,7 @@ int my_data_handler(void)
task = kthread_run(more_data_handling, data, "more_data_handling"); task = kthread_run(more_data_handling, data, "more_data_handling");
if (task == ERR_PTR(-ENOMEM)) { if (task == ERR_PTR(-ENOMEM)) {
rv = -ENOMEM; rv = -ENOMEM;
kref_put(&data->refcount, data_release);
goto out; goto out;
} }
......
...@@ -1607,7 +1607,7 @@ int device_private_init(struct device *dev) ...@@ -1607,7 +1607,7 @@ int device_private_init(struct device *dev)
*/ */
int device_add(struct device *dev) int device_add(struct device *dev)
{ {
struct device *parent = NULL; struct device *parent;
struct kobject *kobj; struct kobject *kobj;
struct class_interface *class_intf; struct class_interface *class_intf;
int error = -EINVAL; int error = -EINVAL;
......
...@@ -309,14 +309,13 @@ void *dma_common_contiguous_remap(struct page *page, size_t size, ...@@ -309,14 +309,13 @@ void *dma_common_contiguous_remap(struct page *page, size_t size,
int i; int i;
struct page **pages; struct page **pages;
void *ptr; void *ptr;
unsigned long pfn;
pages = kmalloc(sizeof(struct page *) << get_order(size), GFP_KERNEL); pages = kmalloc(sizeof(struct page *) << get_order(size), GFP_KERNEL);
if (!pages) if (!pages)
return NULL; return NULL;
for (i = 0, pfn = page_to_pfn(page); i < (size >> PAGE_SHIFT); i++) for (i = 0; i < (size >> PAGE_SHIFT); i++)
pages[i] = pfn_to_page(pfn + i); pages[i] = nth_page(page, i);
ptr = dma_common_pages_remap(pages, size, vm_flags, prot, caller); ptr = dma_common_pages_remap(pages, size, vm_flags, prot, caller);
......
...@@ -74,7 +74,7 @@ static const struct file_operations __fops = { \ ...@@ -74,7 +74,7 @@ static const struct file_operations __fops = { \
.release = simple_attr_release, \ .release = simple_attr_release, \
.read = debugfs_attr_read, \ .read = debugfs_attr_read, \
.write = debugfs_attr_write, \ .write = debugfs_attr_write, \
.llseek = generic_file_llseek, \ .llseek = no_llseek, \
} }
#if defined(CONFIG_DEBUG_FS) #if defined(CONFIG_DEBUG_FS)
......
...@@ -26,8 +26,21 @@ ...@@ -26,8 +26,21 @@
#define EPOLL_CTL_DEL 2 #define EPOLL_CTL_DEL 2
#define EPOLL_CTL_MOD 3 #define EPOLL_CTL_MOD 3
/* Epoll event masks */
#define EPOLLIN 0x00000001
#define EPOLLPRI 0x00000002
#define EPOLLOUT 0x00000004
#define EPOLLERR 0x00000008
#define EPOLLHUP 0x00000010
#define EPOLLRDNORM 0x00000040
#define EPOLLRDBAND 0x00000080
#define EPOLLWRNORM 0x00000100
#define EPOLLWRBAND 0x00000200
#define EPOLLMSG 0x00000400
#define EPOLLRDHUP 0x00002000
/* Set exclusive wakeup mode for the target file descriptor */ /* Set exclusive wakeup mode for the target file descriptor */
#define EPOLLEXCLUSIVE (1 << 28) #define EPOLLEXCLUSIVE (1U << 28)
/* /*
* Request the handling of system wakeup events so as to prevent system suspends * Request the handling of system wakeup events so as to prevent system suspends
...@@ -39,13 +52,13 @@ ...@@ -39,13 +52,13 @@
* *
* Requires CAP_BLOCK_SUSPEND * Requires CAP_BLOCK_SUSPEND
*/ */
#define EPOLLWAKEUP (1 << 29) #define EPOLLWAKEUP (1U << 29)
/* Set the One Shot behaviour for the target file descriptor */ /* Set the One Shot behaviour for the target file descriptor */
#define EPOLLONESHOT (1 << 30) #define EPOLLONESHOT (1U << 30)
/* Set the Edge Triggered behaviour for the target file descriptor */ /* Set the Edge Triggered behaviour for the target file descriptor */
#define EPOLLET (1 << 31) #define EPOLLET (1U << 31)
/* /*
* On x86-64 make the 64bit structure have the same alignment as the * On x86-64 make the 64bit structure have the same alignment as the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment