Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: pxa27x_keypad - remove input_free_device() in pxa27x_keypad_remove()
  Input: mousedev - fix regression of inverting axes
  Input: uinput - add devname alias to allow module on-demand load
  Input: hil_kbd - fix compile error
  USB: drop tty argument from usb_serial_handle_sysrq_char()
  Input: sysrq - drop tty argument form handle_sysrq()
  Input: sysrq - drop tty argument from sysrq ops handlers
  • Loading branch information
Linus Torvalds committed Aug 28, 2010
2 parents 494e2fb + 288933c commit 2637d13
Show file tree
Hide file tree
Showing 31 changed files with 75 additions and 80 deletions.
2 changes: 1 addition & 1 deletion arch/arm/kernel/etm.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ static void etm_dump(void)
etb_lock(t);
}

static void sysrq_etm_dump(int key, struct tty_struct *tty)
static void sysrq_etm_dump(int key)
{
dev_dbg(tracer.dev, "Dumping ETB buffer\n");
etm_dump();
Expand Down
2 changes: 1 addition & 1 deletion arch/ia64/hp/sim/simserial.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ static void receive_chars(struct tty_struct *tty)
ch = ia64_ssc(0, 0, 0, 0,
SSC_GETCHAR);
while (!ch);
handle_sysrq(ch, NULL);
handle_sysrq(ch);
}
#endif
seen_esc = 0;
Expand Down
5 changes: 2 additions & 3 deletions arch/powerpc/xmon/xmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -2880,15 +2880,14 @@ static void xmon_init(int enable)
}

#ifdef CONFIG_MAGIC_SYSRQ
static void sysrq_handle_xmon(int key, struct tty_struct *tty)
static void sysrq_handle_xmon(int key)
{
/* ensure xmon is enabled */
xmon_init(1);
debugger(get_irq_regs());
}

static struct sysrq_key_op sysrq_xmon_op =
{
static struct sysrq_key_op sysrq_xmon_op = {
.handler = sysrq_handle_xmon,
.help_msg = "Xmon",
.action_msg = "Entering xmon",
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc/kernel/process_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ void arch_trigger_all_cpu_backtrace(void)

#ifdef CONFIG_MAGIC_SYSRQ

static void sysrq_handle_globreg(int key, struct tty_struct *tty)
static void sysrq_handle_globreg(int key)
{
arch_trigger_all_cpu_backtrace();
}
Expand Down
2 changes: 1 addition & 1 deletion arch/um/drivers/mconsole_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ static void with_console(struct mc_request *req, void (*proc)(void *),
static void sysrq_proc(void *arg)
{
char *op = arg;
handle_sysrq(*op, NULL);
handle_sysrq(*op);
}

void mconsole_sysrq(struct mc_request *req)
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/hangcheck-timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static void hangcheck_fire(unsigned long data)
if (hangcheck_dump_tasks) {
printk(KERN_CRIT "Hangcheck: Task state:\n");
#ifdef CONFIG_MAGIC_SYSRQ
handle_sysrq('t', NULL);
handle_sysrq('t');
#endif /* CONFIG_MAGIC_SYSRQ */
}
if (hangcheck_reboot) {
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/hvc_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ int hvc_poll(struct hvc_struct *hp)
if (sysrq_pressed)
continue;
} else if (sysrq_pressed) {
handle_sysrq(buf[i], tty);
handle_sysrq(buf[i]);
sysrq_pressed = 0;
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/hvsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ static void hvsi_insert_chars(struct hvsi_struct *hp, const char *buf, int len)
hp->sysrq = 1;
continue;
} else if (hp->sysrq) {
handle_sysrq(c, hp->tty);
handle_sysrq(c);
hp->sysrq = 0;
continue;
}
Expand Down
53 changes: 26 additions & 27 deletions drivers/char/sysrq.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include <linux/interrupt.h>
#include <linux/mm.h>
#include <linux/fs.h>
#include <linux/tty.h>
#include <linux/mount.h>
#include <linux/kdev_t.h>
#include <linux/major.h>
Expand Down Expand Up @@ -76,7 +75,7 @@ static int __init sysrq_always_enabled_setup(char *str)
__setup("sysrq_always_enabled", sysrq_always_enabled_setup);


static void sysrq_handle_loglevel(int key, struct tty_struct *tty)
static void sysrq_handle_loglevel(int key)
{
int i;

Expand All @@ -93,7 +92,7 @@ static struct sysrq_key_op sysrq_loglevel_op = {
};

#ifdef CONFIG_VT
static void sysrq_handle_SAK(int key, struct tty_struct *tty)
static void sysrq_handle_SAK(int key)
{
struct work_struct *SAK_work = &vc_cons[fg_console].SAK_work;
schedule_work(SAK_work);
Expand All @@ -109,7 +108,7 @@ static struct sysrq_key_op sysrq_SAK_op = {
#endif

#ifdef CONFIG_VT
static void sysrq_handle_unraw(int key, struct tty_struct *tty)
static void sysrq_handle_unraw(int key)
{
struct kbd_struct *kbd = &kbd_table[fg_console];

Expand All @@ -126,7 +125,7 @@ static struct sysrq_key_op sysrq_unraw_op = {
#define sysrq_unraw_op (*(struct sysrq_key_op *)NULL)
#endif /* CONFIG_VT */

static void sysrq_handle_crash(int key, struct tty_struct *tty)
static void sysrq_handle_crash(int key)
{
char *killer = NULL;

Expand All @@ -141,7 +140,7 @@ static struct sysrq_key_op sysrq_crash_op = {
.enable_mask = SYSRQ_ENABLE_DUMP,
};

static void sysrq_handle_reboot(int key, struct tty_struct *tty)
static void sysrq_handle_reboot(int key)
{
lockdep_off();
local_irq_enable();
Expand All @@ -154,7 +153,7 @@ static struct sysrq_key_op sysrq_reboot_op = {
.enable_mask = SYSRQ_ENABLE_BOOT,
};

static void sysrq_handle_sync(int key, struct tty_struct *tty)
static void sysrq_handle_sync(int key)
{
emergency_sync();
}
Expand All @@ -165,7 +164,7 @@ static struct sysrq_key_op sysrq_sync_op = {
.enable_mask = SYSRQ_ENABLE_SYNC,
};

static void sysrq_handle_show_timers(int key, struct tty_struct *tty)
static void sysrq_handle_show_timers(int key)
{
sysrq_timer_list_show();
}
Expand All @@ -176,7 +175,7 @@ static struct sysrq_key_op sysrq_show_timers_op = {
.action_msg = "Show clockevent devices & pending hrtimers (no others)",
};

static void sysrq_handle_mountro(int key, struct tty_struct *tty)
static void sysrq_handle_mountro(int key)
{
emergency_remount();
}
Expand All @@ -188,7 +187,7 @@ static struct sysrq_key_op sysrq_mountro_op = {
};

#ifdef CONFIG_LOCKDEP
static void sysrq_handle_showlocks(int key, struct tty_struct *tty)
static void sysrq_handle_showlocks(int key)
{
debug_show_all_locks();
}
Expand Down Expand Up @@ -226,7 +225,7 @@ static void sysrq_showregs_othercpus(struct work_struct *dummy)

static DECLARE_WORK(sysrq_showallcpus, sysrq_showregs_othercpus);

static void sysrq_handle_showallcpus(int key, struct tty_struct *tty)
static void sysrq_handle_showallcpus(int key)
{
/*
* Fall back to the workqueue based printing if the
Expand All @@ -252,7 +251,7 @@ static struct sysrq_key_op sysrq_showallcpus_op = {
};
#endif

static void sysrq_handle_showregs(int key, struct tty_struct *tty)
static void sysrq_handle_showregs(int key)
{
struct pt_regs *regs = get_irq_regs();
if (regs)
Expand All @@ -266,7 +265,7 @@ static struct sysrq_key_op sysrq_showregs_op = {
.enable_mask = SYSRQ_ENABLE_DUMP,
};

static void sysrq_handle_showstate(int key, struct tty_struct *tty)
static void sysrq_handle_showstate(int key)
{
show_state();
}
Expand All @@ -277,7 +276,7 @@ static struct sysrq_key_op sysrq_showstate_op = {
.enable_mask = SYSRQ_ENABLE_DUMP,
};

static void sysrq_handle_showstate_blocked(int key, struct tty_struct *tty)
static void sysrq_handle_showstate_blocked(int key)
{
show_state_filter(TASK_UNINTERRUPTIBLE);
}
Expand All @@ -291,7 +290,7 @@ static struct sysrq_key_op sysrq_showstate_blocked_op = {
#ifdef CONFIG_TRACING
#include <linux/ftrace.h>

static void sysrq_ftrace_dump(int key, struct tty_struct *tty)
static void sysrq_ftrace_dump(int key)
{
ftrace_dump(DUMP_ALL);
}
Expand All @@ -305,7 +304,7 @@ static struct sysrq_key_op sysrq_ftrace_dump_op = {
#define sysrq_ftrace_dump_op (*(struct sysrq_key_op *)NULL)
#endif

static void sysrq_handle_showmem(int key, struct tty_struct *tty)
static void sysrq_handle_showmem(int key)
{
show_mem();
}
Expand All @@ -330,7 +329,7 @@ static void send_sig_all(int sig)
}
}

static void sysrq_handle_term(int key, struct tty_struct *tty)
static void sysrq_handle_term(int key)
{
send_sig_all(SIGTERM);
console_loglevel = 8;
Expand All @@ -349,7 +348,7 @@ static void moom_callback(struct work_struct *ignored)

static DECLARE_WORK(moom_work, moom_callback);

static void sysrq_handle_moom(int key, struct tty_struct *tty)
static void sysrq_handle_moom(int key)
{
schedule_work(&moom_work);
}
Expand All @@ -361,7 +360,7 @@ static struct sysrq_key_op sysrq_moom_op = {
};

#ifdef CONFIG_BLOCK
static void sysrq_handle_thaw(int key, struct tty_struct *tty)
static void sysrq_handle_thaw(int key)
{
emergency_thaw_all();
}
Expand All @@ -373,7 +372,7 @@ static struct sysrq_key_op sysrq_thaw_op = {
};
#endif

static void sysrq_handle_kill(int key, struct tty_struct *tty)
static void sysrq_handle_kill(int key)
{
send_sig_all(SIGKILL);
console_loglevel = 8;
Expand All @@ -385,7 +384,7 @@ static struct sysrq_key_op sysrq_kill_op = {
.enable_mask = SYSRQ_ENABLE_SIGNAL,
};

static void sysrq_handle_unrt(int key, struct tty_struct *tty)
static void sysrq_handle_unrt(int key)
{
normalize_rt_tasks();
}
Expand Down Expand Up @@ -493,7 +492,7 @@ static void __sysrq_put_key_op(int key, struct sysrq_key_op *op_p)
sysrq_key_table[i] = op_p;
}

void __handle_sysrq(int key, struct tty_struct *tty, int check_mask)
void __handle_sysrq(int key, bool check_mask)
{
struct sysrq_key_op *op_p;
int orig_log_level;
Expand All @@ -520,7 +519,7 @@ void __handle_sysrq(int key, struct tty_struct *tty, int check_mask)
if (!check_mask || sysrq_on_mask(op_p->enable_mask)) {
printk("%s\n", op_p->action_msg);
console_loglevel = orig_log_level;
op_p->handler(key, tty);
op_p->handler(key);
} else {
printk("This sysrq operation is disabled.\n");
}
Expand All @@ -545,10 +544,10 @@ void __handle_sysrq(int key, struct tty_struct *tty, int check_mask)
spin_unlock_irqrestore(&sysrq_key_table_lock, flags);
}

void handle_sysrq(int key, struct tty_struct *tty)
void handle_sysrq(int key)
{
if (sysrq_on())
__handle_sysrq(key, tty, 1);
__handle_sysrq(key, true);
}
EXPORT_SYMBOL(handle_sysrq);

Expand Down Expand Up @@ -597,7 +596,7 @@ static bool sysrq_filter(struct input_handle *handle, unsigned int type,

default:
if (sysrq_down && value && value != 2)
__handle_sysrq(sysrq_xlate[code], NULL, 1);
__handle_sysrq(sysrq_xlate[code], true);
break;
}

Expand Down Expand Up @@ -765,7 +764,7 @@ static ssize_t write_sysrq_trigger(struct file *file, const char __user *buf,

if (get_user(c, buf))
return -EFAULT;
__handle_sysrq(c, NULL, 0);
__handle_sysrq(c, false);
}

return count;
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/drm_fb_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ static void drm_fb_helper_restore_work_fn(struct work_struct *ignored)
}
static DECLARE_WORK(drm_fb_helper_restore_work, drm_fb_helper_restore_work_fn);

static void drm_fb_helper_sysrq(int dummy1, struct tty_struct *dummy3)
static void drm_fb_helper_sysrq(int dummy1)
{
schedule_work(&drm_fb_helper_restore_work);
}
Expand Down
12 changes: 6 additions & 6 deletions drivers/input/keyboard/hil_kbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,13 @@ static void hil_dev_handle_ptr_events(struct hil_dev *ptr)
if (absdev) {
val = lo + (hi << 8);
#ifdef TABLET_AUTOADJUST
if (val < input_abs_min(dev, ABS_X + i))
if (val < input_abs_get_min(dev, ABS_X + i))
input_abs_set_min(dev, ABS_X + i, val);
if (val > input_abs_max(dev, ABS_X + i))
if (val > input_abs_get_max(dev, ABS_X + i))
input_abs_set_max(dev, ABS_X + i, val);
#endif
if (i % 3)
val = input_abs_max(dev, ABS_X + i) - val;
val = input_abs_get_max(dev, ABS_X + i) - val;
input_report_abs(dev, ABS_X + i, val);
} else {
val = (int) (((int8_t) lo) | ((int8_t) hi << 8));
Expand Down Expand Up @@ -388,11 +388,11 @@ static void hil_dev_pointer_setup(struct hil_dev *ptr)

#ifdef TABLET_AUTOADJUST
for (i = 0; i < ABS_MAX; i++) {
int diff = input_abs_max(input_dev, ABS_X + i) / 10;
int diff = input_abs_get_max(input_dev, ABS_X + i) / 10;
input_abs_set_min(input_dev, ABS_X + i,
input_abs_min(input_dev, ABS_X + i) + diff)
input_abs_get_min(input_dev, ABS_X + i) + diff);
input_abs_set_max(input_dev, ABS_X + i,
input_abs_max(input_dev, ABS_X + i) - diff)
input_abs_get_max(input_dev, ABS_X + i) - diff);
}
#endif

Expand Down
2 changes: 0 additions & 2 deletions drivers/input/keyboard/pxa27x_keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,6 @@ static int __devexit pxa27x_keypad_remove(struct platform_device *pdev)
clk_put(keypad->clk);

input_unregister_device(keypad->input_dev);
input_free_device(keypad->input_dev);

iounmap(keypad->mmio_base);

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
Expand Down
2 changes: 2 additions & 0 deletions drivers/input/misc/uinput.c
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,8 @@ static struct miscdevice uinput_misc = {
.minor = UINPUT_MINOR,
.name = UINPUT_NAME,
};
MODULE_ALIAS_MISCDEV(UINPUT_MINOR);
MODULE_ALIAS("devname:" UINPUT_NAME);

static int __init uinput_init(void)
{
Expand Down
8 changes: 4 additions & 4 deletions drivers/input/mousedev.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ static void mousedev_touchpad_event(struct input_dev *dev,

fx(0) = value;
if (mousedev->touch && mousedev->pkt_count >= 2) {
size = input_abs_get_min(dev, ABS_X) -
input_abs_get_max(dev, ABS_X);
size = input_abs_get_max(dev, ABS_X) -
input_abs_get_min(dev, ABS_X);
if (size == 0)
size = 256 * 2;

Expand All @@ -155,8 +155,8 @@ static void mousedev_touchpad_event(struct input_dev *dev,
fy(0) = value;
if (mousedev->touch && mousedev->pkt_count >= 2) {
/* use X size for ABS_Y to keep the same scale */
size = input_abs_get_min(dev, ABS_X) -
input_abs_get_max(dev, ABS_X);
size = input_abs_get_max(dev, ABS_X) -
input_abs_get_min(dev, ABS_X);
if (size == 0)
size = 256 * 2;

Expand Down
Loading

0 comments on commit 2637d13

Please sign in to comment.