diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 22:47:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 22:47:50 -0400 |
commit | 56847d857cb0c3ee78c22ce776a26f88d9ffd4d4 (patch) | |
tree | a85bcf204a53e45d26f6a3984f16ddd525eef3e7 /include | |
parent | 191a712090bb8a10e6f129360eeed2d68f3d4c9a (diff) | |
parent | 8d564368a9a3197f43e56dadf4a18c5738849f94 (diff) |
Merge branch 'akpm' (incoming from Andrew)
Merge second batch of fixes from Andrew Morton:
- various misc bits
- some printk updates
- a new "SRAM" driver.
- MAINTAINERS updates
- the backlight driver queue
- checkpatch updates
- a few init/ changes
- a huge number of drivers/rtc changes
- fatfs updates
- some lib/idr.c work
- some renaming of the random driver interfaces
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (285 commits)
net: rename random32 to prandom
net/core: remove duplicate statements by do-while loop
net/core: rename random32() to prandom_u32()
net/netfilter: rename random32() to prandom_u32()
net/sched: rename random32() to prandom_u32()
net/sunrpc: rename random32() to prandom_u32()
scsi: rename random32() to prandom_u32()
lguest: rename random32() to prandom_u32()
uwb: rename random32() to prandom_u32()
video/uvesafb: rename random32() to prandom_u32()
mmc: rename random32() to prandom_u32()
drbd: rename random32() to prandom_u32()
kernel/: rename random32() to prandom_u32()
mm/: rename random32() to prandom_u32()
lib/: rename random32() to prandom_u32()
x86: rename random32() to prandom_u32()
x86: pageattr-test: remove srandom32 call
uuid: use prandom_bytes()
raid6test: use prandom_bytes()
sctp: convert sctp_assoc_set_id() to use idr_alloc_cyclic()
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/compiler-gcc4.h | 2 | ||||
-rw-r--r-- | include/linux/console.h | 1 | ||||
-rw-r--r-- | include/linux/ctype.h | 6 | ||||
-rw-r--r-- | include/linux/exportfs.h | 11 | ||||
-rw-r--r-- | include/linux/fsnotify_backend.h | 1 | ||||
-rw-r--r-- | include/linux/genalloc.h | 18 | ||||
-rw-r--r-- | include/linux/idr.h | 2 | ||||
-rw-r--r-- | include/linux/mfd/tps65217.h | 1 | ||||
-rw-r--r-- | include/linux/net.h | 4 | ||||
-rw-r--r-- | include/linux/platform_data/coda.h | 18 | ||||
-rw-r--r-- | include/linux/platform_data/lp855x.h | 15 | ||||
-rw-r--r-- | include/linux/printk.h | 7 | ||||
-rw-r--r-- | include/linux/rtc.h | 6 | ||||
-rw-r--r-- | include/trace/events/printk.h | 25 | ||||
-rw-r--r-- | include/video/platform_lcd.h | 1 |
15 files changed, 82 insertions, 36 deletions
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index 68b162d92254..842de225055f 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #define __must_check __attribute__((warn_unused_result)) | 13 | #define __must_check __attribute__((warn_unused_result)) |
14 | #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) | 14 | #define __compiler_offsetof(a,b) __builtin_offsetof(a,b) |
15 | 15 | ||
16 | #if GCC_VERSION >= 40100 | 16 | #if GCC_VERSION >= 40100 && GCC_VERSION < 40600 |
17 | # define __compiletime_object_size(obj) __builtin_object_size(obj, 0) | 17 | # define __compiletime_object_size(obj) __builtin_object_size(obj, 0) |
18 | #endif | 18 | #endif |
19 | 19 | ||
diff --git a/include/linux/console.h b/include/linux/console.h index 29680a8cda99..73bab0f58af5 100644 --- a/include/linux/console.h +++ b/include/linux/console.h | |||
@@ -141,6 +141,7 @@ struct console { | |||
141 | for (con = console_drivers; con != NULL; con = con->next) | 141 | for (con = console_drivers; con != NULL; con = con->next) |
142 | 142 | ||
143 | extern int console_set_on_cmdline; | 143 | extern int console_set_on_cmdline; |
144 | extern struct console *early_console; | ||
144 | 145 | ||
145 | extern int add_preferred_console(char *name, int idx, char *options); | 146 | extern int add_preferred_console(char *name, int idx, char *options); |
146 | extern int update_console_cmdline(char *name, int idx, char *name_new, int idx_new, char *options); | 147 | extern int update_console_cmdline(char *name, int idx, char *name_new, int idx_new, char *options); |
diff --git a/include/linux/ctype.h b/include/linux/ctype.h index 8acfe312f947..653589e3e30e 100644 --- a/include/linux/ctype.h +++ b/include/linux/ctype.h | |||
@@ -61,4 +61,10 @@ static inline char _tolower(const char c) | |||
61 | return c | 0x20; | 61 | return c | 0x20; |
62 | } | 62 | } |
63 | 63 | ||
64 | /* Fast check for octal digit */ | ||
65 | static inline int isodigit(const char c) | ||
66 | { | ||
67 | return c >= '0' && c <= '7'; | ||
68 | } | ||
69 | |||
64 | #endif | 70 | #endif |
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h index 5b9b5b317180..41b223a59a63 100644 --- a/include/linux/exportfs.h +++ b/include/linux/exportfs.h | |||
@@ -85,6 +85,17 @@ enum fid_type { | |||
85 | FILEID_NILFS_WITH_PARENT = 0x62, | 85 | FILEID_NILFS_WITH_PARENT = 0x62, |
86 | 86 | ||
87 | /* | 87 | /* |
88 | * 32 bit generation number, 40 bit i_pos. | ||
89 | */ | ||
90 | FILEID_FAT_WITHOUT_PARENT = 0x71, | ||
91 | |||
92 | /* | ||
93 | * 32 bit generation number, 40 bit i_pos, | ||
94 | * 32 bit parent generation number, 40 bit parent i_pos | ||
95 | */ | ||
96 | FILEID_FAT_WITH_PARENT = 0x72, | ||
97 | |||
98 | /* | ||
88 | * Filesystems must not use 0xff file ID. | 99 | * Filesystems must not use 0xff file ID. |
89 | */ | 100 | */ |
90 | FILEID_INVALID = 0xff, | 101 | FILEID_INVALID = 0xff, |
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index d5b0910d4961..4b2ee8d12f5e 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
@@ -157,7 +157,6 @@ struct fsnotify_group { | |||
157 | struct inotify_group_private_data { | 157 | struct inotify_group_private_data { |
158 | spinlock_t idr_lock; | 158 | spinlock_t idr_lock; |
159 | struct idr idr; | 159 | struct idr idr; |
160 | u32 last_wd; | ||
161 | struct user_struct *user; | 160 | struct user_struct *user; |
162 | } inotify_data; | 161 | } inotify_data; |
163 | #endif | 162 | #endif |
diff --git a/include/linux/genalloc.h b/include/linux/genalloc.h index dd7c569aacad..661d374aeb2d 100644 --- a/include/linux/genalloc.h +++ b/include/linux/genalloc.h | |||
@@ -29,6 +29,10 @@ | |||
29 | 29 | ||
30 | #ifndef __GENALLOC_H__ | 30 | #ifndef __GENALLOC_H__ |
31 | #define __GENALLOC_H__ | 31 | #define __GENALLOC_H__ |
32 | |||
33 | struct device; | ||
34 | struct device_node; | ||
35 | |||
32 | /** | 36 | /** |
33 | * Allocation callback function type definition | 37 | * Allocation callback function type definition |
34 | * @map: Pointer to bitmap | 38 | * @map: Pointer to bitmap |
@@ -105,4 +109,18 @@ extern unsigned long gen_pool_first_fit(unsigned long *map, unsigned long size, | |||
105 | extern unsigned long gen_pool_best_fit(unsigned long *map, unsigned long size, | 109 | extern unsigned long gen_pool_best_fit(unsigned long *map, unsigned long size, |
106 | unsigned long start, unsigned int nr, void *data); | 110 | unsigned long start, unsigned int nr, void *data); |
107 | 111 | ||
112 | extern struct gen_pool *devm_gen_pool_create(struct device *dev, | ||
113 | int min_alloc_order, int nid); | ||
114 | extern struct gen_pool *dev_get_gen_pool(struct device *dev); | ||
115 | |||
116 | #ifdef CONFIG_OF | ||
117 | extern struct gen_pool *of_get_named_gen_pool(struct device_node *np, | ||
118 | const char *propname, int index); | ||
119 | #else | ||
120 | static inline struct gen_pool *of_get_named_gen_pool(struct device_node *np, | ||
121 | const char *propname, int index) | ||
122 | { | ||
123 | return NULL; | ||
124 | } | ||
125 | #endif | ||
108 | #endif /* __GENALLOC_H__ */ | 126 | #endif /* __GENALLOC_H__ */ |
diff --git a/include/linux/idr.h b/include/linux/idr.h index 2640c7e99e51..a470ac3ef49d 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h | |||
@@ -42,6 +42,7 @@ struct idr { | |||
42 | struct idr_layer *id_free; | 42 | struct idr_layer *id_free; |
43 | int layers; /* only valid w/o concurrent changes */ | 43 | int layers; /* only valid w/o concurrent changes */ |
44 | int id_free_cnt; | 44 | int id_free_cnt; |
45 | int cur; /* current pos for cyclic allocation */ | ||
45 | spinlock_t lock; | 46 | spinlock_t lock; |
46 | }; | 47 | }; |
47 | 48 | ||
@@ -75,6 +76,7 @@ struct idr { | |||
75 | void *idr_find_slowpath(struct idr *idp, int id); | 76 | void *idr_find_slowpath(struct idr *idp, int id); |
76 | void idr_preload(gfp_t gfp_mask); | 77 | void idr_preload(gfp_t gfp_mask); |
77 | int idr_alloc(struct idr *idp, void *ptr, int start, int end, gfp_t gfp_mask); | 78 | int idr_alloc(struct idr *idp, void *ptr, int start, int end, gfp_t gfp_mask); |
79 | int idr_alloc_cyclic(struct idr *idr, void *ptr, int start, int end, gfp_t gfp_mask); | ||
78 | int idr_for_each(struct idr *idp, | 80 | int idr_for_each(struct idr *idp, |
79 | int (*fn)(int id, void *p, void *data), void *data); | 81 | int (*fn)(int id, void *p, void *data), void *data); |
80 | void *idr_get_next(struct idr *idp, int *nextid); | 82 | void *idr_get_next(struct idr *idp, int *nextid); |
diff --git a/include/linux/mfd/tps65217.h b/include/linux/mfd/tps65217.h index 290762f93930..29eab2bd3dfa 100644 --- a/include/linux/mfd/tps65217.h +++ b/include/linux/mfd/tps65217.h | |||
@@ -228,6 +228,7 @@ enum tps65217_bl_fdim { | |||
228 | struct tps65217_bl_pdata { | 228 | struct tps65217_bl_pdata { |
229 | enum tps65217_bl_isel isel; | 229 | enum tps65217_bl_isel isel; |
230 | enum tps65217_bl_fdim fdim; | 230 | enum tps65217_bl_fdim fdim; |
231 | int dft_brightness; | ||
231 | }; | 232 | }; |
232 | 233 | ||
233 | /** | 234 | /** |
diff --git a/include/linux/net.h b/include/linux/net.h index aa1673160a45..99c9f0c103c2 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -240,8 +240,8 @@ do { \ | |||
240 | #define net_dbg_ratelimited(fmt, ...) \ | 240 | #define net_dbg_ratelimited(fmt, ...) \ |
241 | net_ratelimited_function(pr_debug, fmt, ##__VA_ARGS__) | 241 | net_ratelimited_function(pr_debug, fmt, ##__VA_ARGS__) |
242 | 242 | ||
243 | #define net_random() random32() | 243 | #define net_random() prandom_u32() |
244 | #define net_srandom(seed) srandom32((__force u32)seed) | 244 | #define net_srandom(seed) prandom_seed((__force u32)(seed)) |
245 | 245 | ||
246 | extern int kernel_sendmsg(struct socket *sock, struct msghdr *msg, | 246 | extern int kernel_sendmsg(struct socket *sock, struct msghdr *msg, |
247 | struct kvec *vec, size_t num, size_t len); | 247 | struct kvec *vec, size_t num, size_t len); |
diff --git a/include/linux/platform_data/coda.h b/include/linux/platform_data/coda.h new file mode 100644 index 000000000000..6ad4410d9e20 --- /dev/null +++ b/include/linux/platform_data/coda.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013 Philipp Zabel, Pengutronix | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | */ | ||
9 | #ifndef PLATFORM_CODA_H | ||
10 | #define PLATFORM_CODA_H | ||
11 | |||
12 | struct device; | ||
13 | |||
14 | struct coda_platform_data { | ||
15 | struct device *iram_dev; | ||
16 | }; | ||
17 | |||
18 | #endif | ||
diff --git a/include/linux/platform_data/lp855x.h b/include/linux/platform_data/lp855x.h index 20ee8b221dbd..ea3200527dd3 100644 --- a/include/linux/platform_data/lp855x.h +++ b/include/linux/platform_data/lp855x.h | |||
@@ -69,11 +69,6 @@ enum lp855x_chip_id { | |||
69 | LP8557, | 69 | LP8557, |
70 | }; | 70 | }; |
71 | 71 | ||
72 | enum lp855x_brightness_ctrl_mode { | ||
73 | PWM_BASED = 1, | ||
74 | REGISTER_BASED, | ||
75 | }; | ||
76 | |||
77 | enum lp8550_brighntess_source { | 72 | enum lp8550_brighntess_source { |
78 | LP8550_PWM_ONLY, | 73 | LP8550_PWM_ONLY, |
79 | LP8550_I2C_ONLY = 2, | 74 | LP8550_I2C_ONLY = 2, |
@@ -116,24 +111,18 @@ struct lp855x_rom_data { | |||
116 | /** | 111 | /** |
117 | * struct lp855x_platform_data | 112 | * struct lp855x_platform_data |
118 | * @name : Backlight driver name. If it is not defined, default name is set. | 113 | * @name : Backlight driver name. If it is not defined, default name is set. |
119 | * @mode : brightness control by pwm or lp855x register | ||
120 | * @device_control : value of DEVICE CONTROL register | 114 | * @device_control : value of DEVICE CONTROL register |
121 | * @initial_brightness : initial value of backlight brightness | 115 | * @initial_brightness : initial value of backlight brightness |
122 | * @period_ns : platform specific pwm period value. unit is nano. | 116 | * @period_ns : platform specific pwm period value. unit is nano. |
123 | Only valid when mode is PWM_BASED. | 117 | Only valid when mode is PWM_BASED. |
124 | * @load_new_rom_data : | ||
125 | 0 : use default configuration data | ||
126 | 1 : update values of eeprom or eprom registers on loading driver | ||
127 | * @size_program : total size of lp855x_rom_data | 118 | * @size_program : total size of lp855x_rom_data |
128 | * @rom_data : list of new eeprom/eprom registers | 119 | * @rom_data : list of new eeprom/eprom registers |
129 | */ | 120 | */ |
130 | struct lp855x_platform_data { | 121 | struct lp855x_platform_data { |
131 | char *name; | 122 | const char *name; |
132 | enum lp855x_brightness_ctrl_mode mode; | ||
133 | u8 device_control; | 123 | u8 device_control; |
134 | int initial_brightness; | 124 | u8 initial_brightness; |
135 | unsigned int period_ns; | 125 | unsigned int period_ns; |
136 | u8 load_new_rom_data; | ||
137 | int size_program; | 126 | int size_program; |
138 | struct lp855x_rom_data *rom_data; | 127 | struct lp855x_rom_data *rom_data; |
139 | }; | 128 | }; |
diff --git a/include/linux/printk.h b/include/linux/printk.h index 822171fcb1c8..4890fe62c011 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef __KERNEL_PRINTK__ | 1 | #ifndef __KERNEL_PRINTK__ |
2 | #define __KERNEL_PRINTK__ | 2 | #define __KERNEL_PRINTK__ |
3 | 3 | ||
4 | #include <stdarg.h> | ||
4 | #include <linux/init.h> | 5 | #include <linux/init.h> |
5 | #include <linux/kern_levels.h> | 6 | #include <linux/kern_levels.h> |
6 | 7 | ||
@@ -95,8 +96,14 @@ int no_printk(const char *fmt, ...) | |||
95 | return 0; | 96 | return 0; |
96 | } | 97 | } |
97 | 98 | ||
99 | #ifdef CONFIG_EARLY_PRINTK | ||
98 | extern asmlinkage __printf(1, 2) | 100 | extern asmlinkage __printf(1, 2) |
99 | void early_printk(const char *fmt, ...); | 101 | void early_printk(const char *fmt, ...); |
102 | void early_vprintk(const char *fmt, va_list ap); | ||
103 | #else | ||
104 | static inline __printf(1, 2) __cold | ||
105 | void early_printk(const char *s, ...) { } | ||
106 | #endif | ||
100 | 107 | ||
101 | #ifdef CONFIG_PRINTK | 108 | #ifdef CONFIG_PRINTK |
102 | asmlinkage __printf(5, 0) | 109 | asmlinkage __printf(5, 0) |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 580b24c8b8ca..c2c28975293c 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -133,7 +133,13 @@ extern struct rtc_device *rtc_device_register(const char *name, | |||
133 | struct device *dev, | 133 | struct device *dev, |
134 | const struct rtc_class_ops *ops, | 134 | const struct rtc_class_ops *ops, |
135 | struct module *owner); | 135 | struct module *owner); |
136 | extern struct rtc_device *devm_rtc_device_register(struct device *dev, | ||
137 | const char *name, | ||
138 | const struct rtc_class_ops *ops, | ||
139 | struct module *owner); | ||
136 | extern void rtc_device_unregister(struct rtc_device *rtc); | 140 | extern void rtc_device_unregister(struct rtc_device *rtc); |
141 | extern void devm_rtc_device_unregister(struct device *dev, | ||
142 | struct rtc_device *rtc); | ||
137 | 143 | ||
138 | extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm); | 144 | extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm); |
139 | extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm); | 145 | extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm); |
diff --git a/include/trace/events/printk.h b/include/trace/events/printk.h index 94ec79cc011a..c008bc99f9fa 100644 --- a/include/trace/events/printk.h +++ b/include/trace/events/printk.h | |||
@@ -6,31 +6,18 @@ | |||
6 | 6 | ||
7 | #include <linux/tracepoint.h> | 7 | #include <linux/tracepoint.h> |
8 | 8 | ||
9 | TRACE_EVENT_CONDITION(console, | 9 | TRACE_EVENT(console, |
10 | TP_PROTO(const char *log_buf, unsigned start, unsigned end, | 10 | TP_PROTO(const char *text, size_t len), |
11 | unsigned log_buf_len), | ||
12 | 11 | ||
13 | TP_ARGS(log_buf, start, end, log_buf_len), | 12 | TP_ARGS(text, len), |
14 | |||
15 | TP_CONDITION(start != end), | ||
16 | 13 | ||
17 | TP_STRUCT__entry( | 14 | TP_STRUCT__entry( |
18 | __dynamic_array(char, msg, end - start + 1) | 15 | __dynamic_array(char, msg, len + 1) |
19 | ), | 16 | ), |
20 | 17 | ||
21 | TP_fast_assign( | 18 | TP_fast_assign( |
22 | if ((start & (log_buf_len - 1)) > (end & (log_buf_len - 1))) { | 19 | memcpy(__get_dynamic_array(msg), text, len); |
23 | memcpy(__get_dynamic_array(msg), | 20 | ((char *)__get_dynamic_array(msg))[len] = 0; |
24 | log_buf + (start & (log_buf_len - 1)), | ||
25 | log_buf_len - (start & (log_buf_len - 1))); | ||
26 | memcpy((char *)__get_dynamic_array(msg) + | ||
27 | log_buf_len - (start & (log_buf_len - 1)), | ||
28 | log_buf, end & (log_buf_len - 1)); | ||
29 | } else | ||
30 | memcpy(__get_dynamic_array(msg), | ||
31 | log_buf + (start & (log_buf_len - 1)), | ||
32 | end - start); | ||
33 | ((char *)__get_dynamic_array(msg))[end - start] = 0; | ||
34 | ), | 21 | ), |
35 | 22 | ||
36 | TP_printk("%s", __get_str(msg)) | 23 | TP_printk("%s", __get_str(msg)) |
diff --git a/include/video/platform_lcd.h b/include/video/platform_lcd.h index ad3bdfe743b2..23864b284147 100644 --- a/include/video/platform_lcd.h +++ b/include/video/platform_lcd.h | |||
@@ -15,6 +15,7 @@ struct plat_lcd_data; | |||
15 | struct fb_info; | 15 | struct fb_info; |
16 | 16 | ||
17 | struct plat_lcd_data { | 17 | struct plat_lcd_data { |
18 | int (*probe)(struct plat_lcd_data *); | ||
18 | void (*set_power)(struct plat_lcd_data *, unsigned int power); | 19 | void (*set_power)(struct plat_lcd_data *, unsigned int power); |
19 | int (*match_fb)(struct plat_lcd_data *, struct fb_info *); | 20 | int (*match_fb)(struct plat_lcd_data *, struct fb_info *); |
20 | }; | 21 | }; |