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() ...
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
#define __must_check __attribute__((warn_unused_result))
|
||||
#define __compiler_offsetof(a,b) __builtin_offsetof(a,b)
|
||||
|
||||
#if GCC_VERSION >= 40100
|
||||
#if GCC_VERSION >= 40100 && GCC_VERSION < 40600
|
||||
# define __compiletime_object_size(obj) __builtin_object_size(obj, 0)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -141,6 +141,7 @@ struct console {
|
||||
for (con = console_drivers; con != NULL; con = con->next)
|
||||
|
||||
extern int console_set_on_cmdline;
|
||||
extern struct console *early_console;
|
||||
|
||||
extern int add_preferred_console(char *name, int idx, char *options);
|
||||
extern int update_console_cmdline(char *name, int idx, char *name_new, int idx_new, char *options);
|
||||
|
||||
@@ -61,4 +61,10 @@ static inline char _tolower(const char c)
|
||||
return c | 0x20;
|
||||
}
|
||||
|
||||
/* Fast check for octal digit */
|
||||
static inline int isodigit(const char c)
|
||||
{
|
||||
return c >= '0' && c <= '7';
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -84,6 +84,17 @@ enum fid_type {
|
||||
*/
|
||||
FILEID_NILFS_WITH_PARENT = 0x62,
|
||||
|
||||
/*
|
||||
* 32 bit generation number, 40 bit i_pos.
|
||||
*/
|
||||
FILEID_FAT_WITHOUT_PARENT = 0x71,
|
||||
|
||||
/*
|
||||
* 32 bit generation number, 40 bit i_pos,
|
||||
* 32 bit parent generation number, 40 bit parent i_pos
|
||||
*/
|
||||
FILEID_FAT_WITH_PARENT = 0x72,
|
||||
|
||||
/*
|
||||
* Filesystems must not use 0xff file ID.
|
||||
*/
|
||||
|
||||
@@ -157,7 +157,6 @@ struct fsnotify_group {
|
||||
struct inotify_group_private_data {
|
||||
spinlock_t idr_lock;
|
||||
struct idr idr;
|
||||
u32 last_wd;
|
||||
struct user_struct *user;
|
||||
} inotify_data;
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,10 @@
|
||||
|
||||
#ifndef __GENALLOC_H__
|
||||
#define __GENALLOC_H__
|
||||
|
||||
struct device;
|
||||
struct device_node;
|
||||
|
||||
/**
|
||||
* Allocation callback function type definition
|
||||
* @map: Pointer to bitmap
|
||||
@@ -105,4 +109,18 @@ extern unsigned long gen_pool_first_fit(unsigned long *map, unsigned long size,
|
||||
extern unsigned long gen_pool_best_fit(unsigned long *map, unsigned long size,
|
||||
unsigned long start, unsigned int nr, void *data);
|
||||
|
||||
extern struct gen_pool *devm_gen_pool_create(struct device *dev,
|
||||
int min_alloc_order, int nid);
|
||||
extern struct gen_pool *dev_get_gen_pool(struct device *dev);
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
extern struct gen_pool *of_get_named_gen_pool(struct device_node *np,
|
||||
const char *propname, int index);
|
||||
#else
|
||||
static inline struct gen_pool *of_get_named_gen_pool(struct device_node *np,
|
||||
const char *propname, int index)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
#endif /* __GENALLOC_H__ */
|
||||
|
||||
@@ -42,6 +42,7 @@ struct idr {
|
||||
struct idr_layer *id_free;
|
||||
int layers; /* only valid w/o concurrent changes */
|
||||
int id_free_cnt;
|
||||
int cur; /* current pos for cyclic allocation */
|
||||
spinlock_t lock;
|
||||
};
|
||||
|
||||
@@ -75,6 +76,7 @@ struct idr {
|
||||
void *idr_find_slowpath(struct idr *idp, int id);
|
||||
void idr_preload(gfp_t gfp_mask);
|
||||
int idr_alloc(struct idr *idp, void *ptr, int start, int end, gfp_t gfp_mask);
|
||||
int idr_alloc_cyclic(struct idr *idr, void *ptr, int start, int end, gfp_t gfp_mask);
|
||||
int idr_for_each(struct idr *idp,
|
||||
int (*fn)(int id, void *p, void *data), void *data);
|
||||
void *idr_get_next(struct idr *idp, int *nextid);
|
||||
|
||||
@@ -228,6 +228,7 @@ enum tps65217_bl_fdim {
|
||||
struct tps65217_bl_pdata {
|
||||
enum tps65217_bl_isel isel;
|
||||
enum tps65217_bl_fdim fdim;
|
||||
int dft_brightness;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
+2
-2
@@ -240,8 +240,8 @@ do { \
|
||||
#define net_dbg_ratelimited(fmt, ...) \
|
||||
net_ratelimited_function(pr_debug, fmt, ##__VA_ARGS__)
|
||||
|
||||
#define net_random() random32()
|
||||
#define net_srandom(seed) srandom32((__force u32)seed)
|
||||
#define net_random() prandom_u32()
|
||||
#define net_srandom(seed) prandom_seed((__force u32)(seed))
|
||||
|
||||
extern int kernel_sendmsg(struct socket *sock, struct msghdr *msg,
|
||||
struct kvec *vec, size_t num, size_t len);
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (C) 2013 Philipp Zabel, Pengutronix
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
#ifndef PLATFORM_CODA_H
|
||||
#define PLATFORM_CODA_H
|
||||
|
||||
struct device;
|
||||
|
||||
struct coda_platform_data {
|
||||
struct device *iram_dev;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -69,11 +69,6 @@ enum lp855x_chip_id {
|
||||
LP8557,
|
||||
};
|
||||
|
||||
enum lp855x_brightness_ctrl_mode {
|
||||
PWM_BASED = 1,
|
||||
REGISTER_BASED,
|
||||
};
|
||||
|
||||
enum lp8550_brighntess_source {
|
||||
LP8550_PWM_ONLY,
|
||||
LP8550_I2C_ONLY = 2,
|
||||
@@ -116,24 +111,18 @@ struct lp855x_rom_data {
|
||||
/**
|
||||
* struct lp855x_platform_data
|
||||
* @name : Backlight driver name. If it is not defined, default name is set.
|
||||
* @mode : brightness control by pwm or lp855x register
|
||||
* @device_control : value of DEVICE CONTROL register
|
||||
* @initial_brightness : initial value of backlight brightness
|
||||
* @period_ns : platform specific pwm period value. unit is nano.
|
||||
Only valid when mode is PWM_BASED.
|
||||
* @load_new_rom_data :
|
||||
0 : use default configuration data
|
||||
1 : update values of eeprom or eprom registers on loading driver
|
||||
* @size_program : total size of lp855x_rom_data
|
||||
* @rom_data : list of new eeprom/eprom registers
|
||||
*/
|
||||
struct lp855x_platform_data {
|
||||
char *name;
|
||||
enum lp855x_brightness_ctrl_mode mode;
|
||||
const char *name;
|
||||
u8 device_control;
|
||||
int initial_brightness;
|
||||
u8 initial_brightness;
|
||||
unsigned int period_ns;
|
||||
u8 load_new_rom_data;
|
||||
int size_program;
|
||||
struct lp855x_rom_data *rom_data;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef __KERNEL_PRINTK__
|
||||
#define __KERNEL_PRINTK__
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/kern_levels.h>
|
||||
|
||||
@@ -95,8 +96,14 @@ int no_printk(const char *fmt, ...)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_EARLY_PRINTK
|
||||
extern asmlinkage __printf(1, 2)
|
||||
void early_printk(const char *fmt, ...);
|
||||
void early_vprintk(const char *fmt, va_list ap);
|
||||
#else
|
||||
static inline __printf(1, 2) __cold
|
||||
void early_printk(const char *s, ...) { }
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PRINTK
|
||||
asmlinkage __printf(5, 0)
|
||||
|
||||
@@ -133,7 +133,13 @@ extern struct rtc_device *rtc_device_register(const char *name,
|
||||
struct device *dev,
|
||||
const struct rtc_class_ops *ops,
|
||||
struct module *owner);
|
||||
extern struct rtc_device *devm_rtc_device_register(struct device *dev,
|
||||
const char *name,
|
||||
const struct rtc_class_ops *ops,
|
||||
struct module *owner);
|
||||
extern void rtc_device_unregister(struct rtc_device *rtc);
|
||||
extern void devm_rtc_device_unregister(struct device *dev,
|
||||
struct rtc_device *rtc);
|
||||
|
||||
extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm);
|
||||
extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm);
|
||||
|
||||
@@ -6,31 +6,18 @@
|
||||
|
||||
#include <linux/tracepoint.h>
|
||||
|
||||
TRACE_EVENT_CONDITION(console,
|
||||
TP_PROTO(const char *log_buf, unsigned start, unsigned end,
|
||||
unsigned log_buf_len),
|
||||
TRACE_EVENT(console,
|
||||
TP_PROTO(const char *text, size_t len),
|
||||
|
||||
TP_ARGS(log_buf, start, end, log_buf_len),
|
||||
|
||||
TP_CONDITION(start != end),
|
||||
TP_ARGS(text, len),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__dynamic_array(char, msg, end - start + 1)
|
||||
__dynamic_array(char, msg, len + 1)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
if ((start & (log_buf_len - 1)) > (end & (log_buf_len - 1))) {
|
||||
memcpy(__get_dynamic_array(msg),
|
||||
log_buf + (start & (log_buf_len - 1)),
|
||||
log_buf_len - (start & (log_buf_len - 1)));
|
||||
memcpy((char *)__get_dynamic_array(msg) +
|
||||
log_buf_len - (start & (log_buf_len - 1)),
|
||||
log_buf, end & (log_buf_len - 1));
|
||||
} else
|
||||
memcpy(__get_dynamic_array(msg),
|
||||
log_buf + (start & (log_buf_len - 1)),
|
||||
end - start);
|
||||
((char *)__get_dynamic_array(msg))[end - start] = 0;
|
||||
memcpy(__get_dynamic_array(msg), text, len);
|
||||
((char *)__get_dynamic_array(msg))[len] = 0;
|
||||
),
|
||||
|
||||
TP_printk("%s", __get_str(msg))
|
||||
|
||||
@@ -15,6 +15,7 @@ struct plat_lcd_data;
|
||||
struct fb_info;
|
||||
|
||||
struct plat_lcd_data {
|
||||
int (*probe)(struct plat_lcd_data *);
|
||||
void (*set_power)(struct plat_lcd_data *, unsigned int power);
|
||||
int (*match_fb)(struct plat_lcd_data *, struct fb_info *);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user