Commit 094803e0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'akpm' (Andrew's incoming)

Quoth Andrew:

 - Most of MM.  Still waiting for the poweroc guys to get off their
   butts and review some threaded hugepages patches.

 - alpha

 - vfs bits

 - drivers/misc

 - a few core kerenl tweaks

 - printk() features

 - MAINTAINERS updates

 - backlight merge

 - leds merge

 - various lib/ updates

 - checkpatch updates

* akpm: (127 commits)
  epoll: fix spurious lockdep warnings
  checkpatch: add a --strict check for utf-8 in commit logs
  kernel.h/checkpatch: mark strict_strto<foo> and simple_strto<foo> as obsolete
  llist-return-whether-list-is-empty-before-adding-in-llist_add-fix
  wireless: at76c50x: follow rename pack_hex_byte to hex_byte_pack
  fat: follow rename pack_hex_byte() to hex_byte_pack()
  security: follow rename pack_hex_byte() to hex_byte_pack()
  kgdb: follow rename pack_hex_byte() to hex_byte_pack()
  lib: rename pack_hex_byte() to hex_byte_pack()
  lib/string.c: fix strim() semantics for strings that have only blanks
  lib/idr.c: fix comment for ida_get_new_above()
  lib/percpu_counter.c: enclose hotplug only variables in hotplug ifdef
  lib/bitmap.c: quiet sparse noise about address space
  lib/spinlock_debug.c: print owner on spinlock lockup
  lib/kstrtox: common code between kstrto*() and simple_strto*() functions
  drivers/leds/leds-lp5521.c: check if reset is successful
  leds: turn the blink_timer off before starting to blink
  leds: save the delay values after a successful call to blink_set()
  drivers/leds/leds-gpio.c: use gpio_get_value_cansleep() when initializing
  drivers/leds/leds-lm3530.c: add __devexit_p where needed
  ...
parents 32087d4e d8805e63
......@@ -973,6 +973,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
ignore_loglevel [KNL]
Ignore loglevel setting - this will print /all/
kernel messages to the console. Useful for debugging.
We also add it as printk module parameter, so users
could change it dynamically, usually by
/sys/module/printk/parameters/ignore_loglevel.
ihash_entries= [KNL]
Set number of hash buckets for inode cache.
......@@ -1666,6 +1669,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
debugging driver suspend/resume hooks). This may
not work reliably with all consoles, but is known
to work with serial and VGA consoles.
To facilitate more flexible debugging, we also add
console_suspend, a printk module parameter to control
it. Users could use console_suspend (usually
/sys/module/printk/parameters/console_suspend) to
turn on/off it dynamically.
noaliencache [MM, NUMA, SLAB] Disables the allocation of alien
caches in the slab allocator. Saves per-node memory,
......
......@@ -24,6 +24,7 @@ show up in /proc/sys/kernel:
- bootloader_type [ X86 only ]
- bootloader_version [ X86 only ]
- callhome [ S390 only ]
- cap_last_cap
- core_pattern
- core_pipe_limit
- core_uses_pid
......@@ -155,6 +156,13 @@ on has a service contract with IBM.
==============================================================
cap_last_cap
Highest valid capability of the running kernel. Exports
CAP_LAST_CAP from the kernel.
==============================================================
core_pattern:
core_pattern is used to specify a core dumpfile pattern name.
......
......@@ -379,10 +379,10 @@ EVENT_PROCESS:
# To closer match vmstat scanning statistics, only count isolate_both
# and isolate_inactive as scanning. isolate_active is rotation
# isolate_inactive == 0
# isolate_active == 1
# isolate_both == 2
if ($isolate_mode != 1) {
# isolate_inactive == 1
# isolate_active == 2
# isolate_both == 3
if ($isolate_mode != 2) {
$perprocesspid{$process_pid}->{HIGH_NR_SCANNED} += $nr_scanned;
}
$perprocesspid{$process_pid}->{HIGH_NR_CONTIG_DIRTY} += $nr_contig_dirty;
......
......@@ -316,6 +316,10 @@ W: http://wiki.analog.com/AD7879
S: Supported
F: drivers/input/touchscreen/ad7879.c
ADDRESS SPACE LAYOUT RANDOMIZATION (ASLR)
M: Jiri Kosina <jkosina@suse.cz>
S: Maintained
ADM1025 HARDWARE MONITOR DRIVER
M: Jean Delvare <khali@linux-fr.org>
L: lm-sensors@lm-sensors.org
......@@ -4020,6 +4024,7 @@ M: Eric Piel <eric.piel@tremplin-utc.net>
S: Maintained
F: Documentation/misc-devices/lis3lv02d
F: drivers/misc/lis3lv02d/
F: drivers/platform/x86/hp_accel.c
LLC (802.2)
M: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
......@@ -4974,7 +4979,7 @@ F: include/linux/i2c-algo-pca.h
F: include/linux/i2c-pca-platform.h
PCI ERROR RECOVERY
M: Linas Vepstas <linas@austin.ibm.com>
M: Linas Vepstas <linasvepstas@gmail.com>
L: linux-pci@vger.kernel.org
S: Supported
F: Documentation/PCI/pci-error-recovery.txt
......
......@@ -457,10 +457,12 @@
#define __NR_clock_adjtime 499
#define __NR_syncfs 500
#define __NR_setns 501
#define __NR_accept4 502
#define __NR_sendmmsg 503
#ifdef __KERNEL__
#define NR_SYSCALLS 502
#define NR_SYSCALLS 504
#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_OLD_READDIR
......
......@@ -520,6 +520,8 @@ sys_call_table:
.quad sys_clock_adjtime
.quad sys_syncfs /* 500 */
.quad sys_setns
.quad sys_accept4
.quad sys_sendmmsg
.size sys_call_table, . - sys_call_table
.type sys_call_table, @object
......
......@@ -241,7 +241,7 @@ static struct regulator_init_data gpo_init = {
};
static struct regulator_consumer_supply vmmc1_consumers[] = {
REGULATOR_SUPPLY("lcd_2v8", NULL),
REGULATOR_SUPPLY("vcore", "spi0.0"),
};
static struct regulator_init_data vmmc1_init = {
......@@ -257,7 +257,7 @@ static struct regulator_init_data vmmc1_init = {
};
static struct regulator_consumer_supply vgen_consumers[] = {
REGULATOR_SUPPLY("vdd_lcdio", NULL),
REGULATOR_SUPPLY("vdd", "spi0.0"),
};
static struct regulator_init_data vgen_init = {
......@@ -348,8 +348,6 @@ static const struct imx_fb_platform_data mx27_3ds_fb_data __initconst = {
static struct l4f00242t03_pdata mx27_3ds_lcd_pdata = {
.reset_gpio = LCD_RESET,
.data_enable_gpio = LCD_ENABLE,
.core_supply = "lcd_2v8",
.io_supply = "vdd_lcdio",
};
static struct spi_board_info mx27_3ds_spi_devs[] __initdata = {
......
......@@ -285,8 +285,6 @@ static struct mx3fb_platform_data mx3fb_pdata __initdata = {
static struct l4f00242t03_pdata mx31_3ds_l4f00242t03_pdata = {
.reset_gpio = IOMUX_TO_GPIO(MX31_PIN_LCS1),
.data_enable_gpio = IOMUX_TO_GPIO(MX31_PIN_SER_RS),
.core_supply = "lcd_2v8",
.io_supply = "vdd_lcdio",
};
/*
......@@ -411,7 +409,7 @@ static struct regulator_init_data vmmc2_init = {
};
static struct regulator_consumer_supply vmmc1_consumers[] = {
REGULATOR_SUPPLY("lcd_2v8", NULL),
REGULATOR_SUPPLY("vcore", "spi0.0"),
REGULATOR_SUPPLY("cmos_2v8", "soc-camera-pdrv.0"),
};
......@@ -428,7 +426,7 @@ static struct regulator_init_data vmmc1_init = {
};
static struct regulator_consumer_supply vgen_consumers[] = {
REGULATOR_SUPPLY("vdd_lcdio", NULL),
REGULATOR_SUPPLY("vdd", "spi0.0"),
};
static struct regulator_init_data vgen_init = {
......
......@@ -694,7 +694,7 @@ mem2hex(char *buf, unsigned char *mem, int count)
/* Valid mem address. */
for (i = 0; i < count; i++) {
ch = *mem++;
buf = pack_hex_byte(buf, ch);
buf = hex_byte_pack(buf, ch);
}
}
......@@ -868,7 +868,7 @@ stub_is_stopped(int sigval)
/* Send trap type (converted to signal) */
*ptr++ = 'T';
ptr = pack_hex_byte(ptr, sigval);
ptr = hex_byte_pack(ptr, sigval);
/* Send register contents. We probably only need to send the
* PC, frame pointer and stack pointer here. Other registers will be
......@@ -881,7 +881,7 @@ stub_is_stopped(int sigval)
status = read_register (regno, &reg_cont);
if (status == SUCCESS) {
ptr = pack_hex_byte(ptr, regno);
ptr = hex_byte_pack(ptr, regno);
*ptr++ = ':';
ptr = mem2hex(ptr, (unsigned char *)&reg_cont,
......
......@@ -677,7 +677,7 @@ mem2hex(char *buf, unsigned char *mem, int count)
/* Valid mem address. */
for (i = 0; i < count; i++) {
ch = *mem++;
buf = pack_hex_byte(buf, ch);
buf = hex_byte_pack(buf, ch);
}
}
/* Terminate properly. */
......@@ -695,7 +695,7 @@ mem2hex_nbo(char *buf, unsigned char *mem, int count)
mem += count - 1;
for (i = 0; i < count; i++) {
ch = *mem--;
buf = pack_hex_byte(buf, ch);
buf = hex_byte_pack(buf, ch);
}
/* Terminate properly. */
......@@ -880,7 +880,7 @@ stub_is_stopped(int sigval)
/* Send trap type (converted to signal) */
*ptr++ = 'T';
ptr = pack_hex_byte(ptr, sigval);
ptr = hex_byte_pack(ptr, sigval);
if (((reg.exs & 0xff00) >> 8) == 0xc) {
......@@ -988,26 +988,26 @@ stub_is_stopped(int sigval)
}
/* Only send PC, frame and stack pointer. */
read_register(PC, &reg_cont);
ptr = pack_hex_byte(ptr, PC);
ptr = hex_byte_pack(ptr, PC);
*ptr++ = ':';
ptr = mem2hex(ptr, (unsigned char *)&reg_cont, register_size[PC]);
*ptr++ = ';';
read_register(R8, &reg_cont);
ptr = pack_hex_byte(ptr, R8);
ptr = hex_byte_pack(ptr, R8);
*ptr++ = ':';
ptr = mem2hex(ptr, (unsigned char *)&reg_cont, register_size[R8]);
*ptr++ = ';';
read_register(SP, &reg_cont);
ptr = pack_hex_byte(ptr, SP);
ptr = hex_byte_pack(ptr, SP);
*ptr++ = ':';
ptr = mem2hex(ptr, (unsigned char *)&reg_cont, register_size[SP]);
*ptr++ = ';';
/* Send ERP as well; this will save us an entire register fetch in some cases. */
read_register(ERP, &reg_cont);
ptr = pack_hex_byte(ptr, ERP);
ptr = hex_byte_pack(ptr, ERP);
*ptr++ = ':';
ptr = mem2hex(ptr, (unsigned char *)&reg_cont, register_size[ERP]);
*ptr++ = ';';
......
......@@ -672,7 +672,7 @@ static unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fa
if ((uint32_t)mem&1 && count>=1) {
if (!gdbstub_read_byte(mem,ch))
return NULL;
buf = pack_hex_byte(buf, ch[0]);
buf = hex_byte_pack(buf, ch[0]);
mem++;
count--;
}
......@@ -680,8 +680,8 @@ static unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fa
if ((uint32_t)mem&3 && count>=2) {
if (!gdbstub_read_word(mem,(uint16_t *)ch))
return NULL;
buf = pack_hex_byte(buf, ch[0]);
buf = pack_hex_byte(buf, ch[1]);
buf = hex_byte_pack(buf, ch[0]);
buf = hex_byte_pack(buf, ch[1]);
mem += 2;
count -= 2;
}
......@@ -689,10 +689,10 @@ static unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fa
while (count>=4) {
if (!gdbstub_read_dword(mem,(uint32_t *)ch))
return NULL;
buf = pack_hex_byte(buf, ch[0]);
buf = pack_hex_byte(buf, ch[1]);
buf = pack_hex_byte(buf, ch[2]);
buf = pack_hex_byte(buf, ch[3]);
buf = hex_byte_pack(buf, ch[0]);
buf = hex_byte_pack(buf, ch[1]);
buf = hex_byte_pack(buf, ch[2]);
buf = hex_byte_pack(buf, ch[3]);
mem += 4;
count -= 4;
}
......@@ -700,8 +700,8 @@ static unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fa
if (count>=2) {
if (!gdbstub_read_word(mem,(uint16_t *)ch))
return NULL;
buf = pack_hex_byte(buf, ch[0]);
buf = pack_hex_byte(buf, ch[1]);
buf = hex_byte_pack(buf, ch[0]);
buf = hex_byte_pack(buf, ch[1]);
mem += 2;
count -= 2;
}
......@@ -709,7 +709,7 @@ static unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fa
if (count>=1) {
if (!gdbstub_read_byte(mem,ch))
return NULL;
buf = pack_hex_byte(buf, ch[0]);
buf = hex_byte_pack(buf, ch[0]);
}
*buf = 0;
......@@ -1498,21 +1498,21 @@ void gdbstub(int sigval)
ptr = mem2hex(title, ptr, sizeof(title) - 1,0);
hx = hex_asc_hi(brr >> 24);
ptr = pack_hex_byte(ptr, hx);
ptr = hex_byte_pack(ptr, hx);
hx = hex_asc_lo(brr >> 24);
ptr = pack_hex_byte(ptr, hx);
ptr = hex_byte_pack(ptr, hx);
hx = hex_asc_hi(brr >> 16);
ptr = pack_hex_byte(ptr, hx);
ptr = hex_byte_pack(ptr, hx);
hx = hex_asc_lo(brr >> 16);
ptr = pack_hex_byte(ptr, hx);
ptr = hex_byte_pack(ptr, hx);
hx = hex_asc_hi(brr >> 8);
ptr = pack_hex_byte(ptr, hx);
ptr = hex_byte_pack(ptr, hx);
hx = hex_asc_lo(brr >> 8);
ptr = pack_hex_byte(ptr, hx);
ptr = hex_byte_pack(ptr, hx);
hx = hex_asc_hi(brr);
ptr = pack_hex_byte(ptr, hx);
ptr = hex_byte_pack(ptr, hx);
hx = hex_asc_lo(brr);
ptr = pack_hex_byte(ptr, hx);
ptr = hex_byte_pack(ptr, hx);
ptr = mem2hex(crlf, ptr, sizeof(crlf) - 1, 0);
*ptr = 0;
......@@ -1526,10 +1526,10 @@ void gdbstub(int sigval)
/* Send trap type (converted to signal) */
*ptr++ = 'T';
ptr = pack_hex_byte(ptr, sigval);
ptr = hex_byte_pack(ptr, sigval);
/* Send Error PC */
ptr = pack_hex_byte(ptr, GDB_REG_PC);
ptr = hex_byte_pack(ptr, GDB_REG_PC);
*ptr++ = ':';
ptr = mem2hex(&__debug_frame->pc, ptr, 4, 0);
*ptr++ = ';';
......@@ -1537,7 +1537,7 @@ void gdbstub(int sigval)
/*
* Send frame pointer
*/
ptr = pack_hex_byte(ptr, GDB_REG_FP);
ptr = hex_byte_pack(ptr, GDB_REG_FP);
*ptr++ = ':';
ptr = mem2hex(&__debug_frame->fp, ptr, 4, 0);
*ptr++ = ';';
......@@ -1545,7 +1545,7 @@ void gdbstub(int sigval)
/*
* Send stack pointer
*/
ptr = pack_hex_byte(ptr, GDB_REG_SP);
ptr = hex_byte_pack(ptr, GDB_REG_SP);
*ptr++ = ':';
ptr = mem2hex(&__debug_frame->sp, ptr, 4, 0);
*ptr++ = ';';
......
......@@ -798,7 +798,7 @@ unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fault)
if ((u32) mem & 1 && count >= 1) {
if (gdbstub_read_byte(mem, ch) != 0)
return 0;
buf = pack_hex_byte(buf, ch[0]);
buf = hex_byte_pack(buf, ch[0]);
mem++;
count--;
}
......@@ -806,8 +806,8 @@ unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fault)
if ((u32) mem & 3 && count >= 2) {
if (gdbstub_read_word(mem, ch) != 0)
return 0;
buf = pack_hex_byte(buf, ch[0]);
buf = pack_hex_byte(buf, ch[1]);
buf = hex_byte_pack(buf, ch[0]);
buf = hex_byte_pack(buf, ch[1]);
mem += 2;
count -= 2;
}
......@@ -815,10 +815,10 @@ unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fault)
while (count >= 4) {
if (gdbstub_read_dword(mem, ch) != 0)
return 0;
buf = pack_hex_byte(buf, ch[0]);
buf = pack_hex_byte(buf, ch[1]);
buf = pack_hex_byte(buf, ch[2]);
buf = pack_hex_byte(buf, ch[3]);
buf = hex_byte_pack(buf, ch[0]);
buf = hex_byte_pack(buf, ch[1]);
buf = hex_byte_pack(buf, ch[2]);
buf = hex_byte_pack(buf, ch[3]);
mem += 4;
count -= 4;
}
......@@ -826,8 +826,8 @@ unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fault)
if (count >= 2) {
if (gdbstub_read_word(mem, ch) != 0)
return 0;
buf = pack_hex_byte(buf, ch[0]);
buf = pack_hex_byte(buf, ch[1]);
buf = hex_byte_pack(buf, ch[0]);
buf = hex_byte_pack(buf, ch[1]);
mem += 2;
count -= 2;
}
......@@ -835,7 +835,7 @@ unsigned char *mem2hex(const void *_mem, char *buf, int count, int may_fault)
if (count >= 1) {
if (gdbstub_read_byte(mem, ch) != 0)
return 0;
buf = pack_hex_byte(buf, ch[0]);
buf = hex_byte_pack(buf, ch[0]);
}
*buf = 0;
......@@ -1273,13 +1273,13 @@ static int gdbstub(struct pt_regs *regs, enum exception_code excep)
ptr = mem2hex(title, ptr, sizeof(title) - 1, 0);
hx = hex_asc_hi(excep >> 8);
ptr = pack_hex_byte(ptr, hx);
ptr = hex_byte_pack(ptr, hx);
hx = hex_asc_lo(excep >> 8);
ptr = pack_hex_byte(ptr, hx);
ptr = hex_byte_pack(ptr, hx);
hx = hex_asc_hi(excep);
ptr = pack_hex_byte(ptr, hx);
ptr = hex_byte_pack(ptr, hx);
hx = hex_asc_lo(excep);
ptr = pack_hex_byte(ptr, hx);
ptr = hex_byte_pack(ptr, hx);
ptr = mem2hex(crlf, ptr, sizeof(crlf) - 1, 0);
*ptr = 0;
......@@ -1291,21 +1291,21 @@ static int gdbstub(struct pt_regs *regs, enum exception_code excep)
ptr = mem2hex(tbcberr, ptr, sizeof(tbcberr) - 1, 0);
hx = hex_asc_hi(bcberr >> 24);
ptr = pack_hex_byte(ptr, hx);
ptr = hex_byte_pack(ptr, hx);
hx = hex_asc_lo(bcberr >> 24);
ptr = pack_hex_byte(ptr, hx);
ptr = hex_byte_pack(ptr, hx);
hx = hex_asc_hi(bcberr >> 16);
ptr = pack_hex_byte(ptr, hx);
ptr = hex_byte_pack(ptr, hx);
hx = hex_asc_lo(bcberr >> 16);
ptr = pack_hex_byte(ptr, hx);
ptr = hex_byte_pack(ptr, hx);
hx = hex_asc_hi(bcberr >> 8);
ptr = pack_hex_byte(ptr, hx);
ptr = hex_byte_pack(ptr, hx);
hx = hex_asc_lo(bcberr >> 8);
ptr = pack_hex_byte(ptr, hx);
ptr = hex_byte_pack(ptr, hx);
hx = hex_asc_hi(bcberr);
ptr = pack_hex_byte(ptr, hx);
ptr = hex_byte_pack(ptr, hx);
hx = hex_asc_lo(bcberr);
ptr = pack_hex_byte(ptr, hx);
ptr = hex_byte_pack(ptr, hx);
ptr = mem2hex(crlf, ptr, sizeof(crlf) - 1, 0);
*ptr = 0;
......@@ -1321,12 +1321,12 @@ static int gdbstub(struct pt_regs *regs, enum exception_code excep)
* Send trap type (converted to signal)
*/
*ptr++ = 'T';
ptr = pack_hex_byte(ptr, sigval);
ptr = hex_byte_pack(ptr, sigval);
/*
* Send Error PC
*/
ptr = pack_hex_byte(ptr, GDB_REGID_PC);
ptr = hex_byte_pack(ptr, GDB_REGID_PC);
*ptr++ = ':';
ptr = mem2hex(&regs->pc, ptr, 4, 0);
*ptr++ = ';';
......@@ -1334,7 +1334,7 @@ static int gdbstub(struct pt_regs *regs, enum exception_code excep)
/*
* Send frame pointer
*/
ptr = pack_hex_byte(ptr, GDB_REGID_FP);
ptr = hex_byte_pack(ptr, GDB_REGID_FP);
*ptr++ = ':';
ptr = mem2hex(&regs->a3, ptr, 4, 0);
*ptr++ = ';';
......@@ -1343,7 +1343,7 @@ static int gdbstub(struct pt_regs *regs, enum exception_code excep)
* Send stack pointer
*/
ssp = (unsigned long) (regs + 1);
ptr = pack_hex_byte(ptr, GDB_REGID_SP);
ptr = hex_byte_pack(ptr, GDB_REGID_SP);
*ptr++ = ':';
ptr = mem2hex(&ssp, ptr, 4, 0);
*ptr++ = ';';
......
......@@ -354,3 +354,5 @@ COMPAT_SYS_SPU(clock_adjtime)
SYSCALL_SPU(syncfs)
COMPAT_SYS_SPU(sendmmsg)
SYSCALL_SPU(setns)
COMPAT_SYS(process_vm_readv)
COMPAT_SYS(process_vm_writev)
......@@ -373,10 +373,12 @@
#define __NR_syncfs 348
#define __NR_sendmmsg 349
#define __NR_setns 350
#define __NR_process_vm_readv 351
#define __NR_process_vm_writev 352
#ifdef __KERNEL__
#define __NR_syscalls 351
#define __NR_syscalls 353
#define __NR__exit __NR_exit
#define NR_syscalls __NR_syscalls
......
......@@ -850,4 +850,6 @@ ia32_sys_call_table:
.quad sys_syncfs
.quad compat_sys_sendmmsg /* 345 */
.quad sys_setns
.quad compat_sys_process_vm_readv
.quad compat_sys_process_vm_writev
ia32_syscall_end:
......@@ -352,10 +352,12 @@
#define __NR_syncfs 344
#define __NR_sendmmsg 345
#define __NR_setns 346
#define __NR_process_vm_readv 347
#define __NR_process_vm_writev 348
#ifdef __KERNEL__
#define NR_syscalls 347
#define NR_syscalls 349
#define __ARCH_WANT_IPC_PARSE_VERSION
#define __ARCH_WANT_OLD_READDIR
......
......@@ -682,6 +682,10 @@ __SYSCALL(__NR_sendmmsg, sys_sendmmsg)
__SYSCALL(__NR_setns, sys_setns)
#define __NR_getcpu 309
__SYSCALL(__NR_getcpu, sys_getcpu)
#define __NR_process_vm_readv 310
__SYSCALL(__NR_process_vm_readv, sys_process_vm_readv)
#define __NR_process_vm_writev 311
__SYSCALL(__NR_process_vm_writev, sys_process_vm_writev)
#ifndef __NO_STUBS
#define __ARCH_WANT_OLD_READDIR
......
......@@ -346,3 +346,5 @@ ENTRY(sys_call_table)
.long sys_syncfs
.long sys_sendmmsg /* 345 */
.long sys_setns
.long sys_process_vm_readv
.long sys_process_vm_writev
......@@ -27,8 +27,7 @@
static struct class *hwmon_class;
static DEFINE_IDR(hwmon_idr);
static DEFINE_SPINLOCK(idr_lock);
static DEFINE_IDA(hwmon_ida);
/**
* hwmon_device_register - register w/ hwmon
......@@ -42,30 +41,17 @@ static DEFINE_SPINLOCK(idr_lock);
struct device *hwmon_device_register(struct device *dev)
{
struct device *hwdev;
int id, err;
again:
if (unlikely(idr_pre_get(&hwmon_idr, GFP_KERNEL) == 0))
return ERR_PTR(-ENOMEM);
spin_lock(&idr_lock);
err = idr_get_new(&hwmon_idr, NULL, &id);
spin_unlock(&idr_lock);
int id;
if (unlikely(err == -EAGAIN))
goto again;
else if (unlikely(err))
return ERR_PTR(err);
id = ida_simple_get(&hwmon_ida, 0, 0, GFP_KERNEL);
if (id < 0)
return ERR_PTR(id);
id = id & MAX_ID_MASK;
hwdev = device_create(hwmon_class, dev, MKDEV(0, 0), NULL,
HWMON_ID_FORMAT, id);
if (IS_ERR(hwdev)) {
spin_lock(&idr_lock);
idr_remove(&hwmon_idr, id);
spin_unlock(&idr_lock);
}
if (IS_ERR(hwdev))
ida_simple_remove(&hwmon_ida, id);
return hwdev;
}
......@@ -81,9 +67,7 @@ void hwmon_device_unregister(struct device *dev)
if (likely(sscanf(dev_name(dev