diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/hid.h | 4 | ||||
-rw-r--r-- | include/linux/rculist.h | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h index 3a95da60fd3e..8c933a86cba9 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -420,10 +420,12 @@ struct hid_report { struct hid_device *device; /* associated device */ }; +#define HID_MAX_IDS 256 + struct hid_report_enum { unsigned numbered; struct list_head report_list; - struct hid_report *report_id_hash[256]; + struct hid_report *report_id_hash[HID_MAX_IDS]; }; #define HID_REPORT_TYPES 3 diff --git a/include/linux/rculist.h b/include/linux/rculist.h index 6f95e241ed68..3863352656e7 100644 --- a/include/linux/rculist.h +++ b/include/linux/rculist.h @@ -254,8 +254,9 @@ static inline void list_splice_init_rcu(struct list_head *list, */ #define list_first_or_null_rcu(ptr, type, member) \ ({struct list_head *__ptr = (ptr); \ - struct list_head __rcu *__next = list_next_rcu(__ptr); \ - likely(__ptr != __next) ? container_of(__next, type, member) : NULL; \ + struct list_head *__next = ACCESS_ONCE(__ptr->next); \ + likely(__ptr != __next) ? \ + list_entry_rcu(__next, type, member) : NULL; \ }) /** |