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: (48 commits)
  Input: add switch for dock events
  Input: add microphone insert switch definition
  Input: i8042 - add Arima-Rioworks HDAMB board to noloop list
  Input: sgi_btns - add support for SGI Indy volume buttons
  Input: add option to disable HP SDC driver
  Input: serio - trivial documentation fix
  Input: add new serio driver for Xilinx XPS PS2 IP
  Input: add driver for Tabletkiosk Sahara TouchIT-213 touchscreen
  Input: new driver for SGI O2 volume buttons
  Input: yealink - reliably kill urbs
  Input: q40kbd - make q40kbd_lock static
  Input: gtco - eliminate early return
  Input: i8042 - add Dritek quirk for Acer Aspire 5720
  Input: usbtouchscreen - ignore eGalax screens supporting HID protocol
  Input: i8042 - add Medion NAM 2070 to noloop blacklist
  Input: i8042 - add Gericom Bellagio to nomux blacklist
  Input: i8042 - add Acer Aspire 1360 to nomux blacklist
  Input: hp_sdc_mlc.c - make a struct static
  Input: hil_mlc.c - make code static
  Input: wistron - generate normal key event if bluetooth or wifi not present
  ...
  • Loading branch information
Linus Torvalds committed Jul 21, 2008
2 parents f8b71a3 + 908cf4b commit 519f014
Show file tree
Hide file tree
Showing 100 changed files with 2,283 additions and 550 deletions.
2 changes: 0 additions & 2 deletions Documentation/input/gameport-programming.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
$Id: gameport-programming.txt,v 1.3 2001/04/24 13:51:37 vojtech Exp $

Programming gameport drivers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
1 change: 0 additions & 1 deletion Documentation/input/input.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Linux Input drivers v1.0
(c) 1999-2001 Vojtech Pavlik <vojtech@ucw.cz>
Sponsored by SuSE
$Id: input.txt,v 1.8 2002/05/29 03:15:01 bradleym Exp $
----------------------------------------------------------------------------

0. Disclaimer
Expand Down
2 changes: 0 additions & 2 deletions Documentation/input/joystick-api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

7 Aug 1998

$Id: joystick-api.txt,v 1.2 2001/05/08 21:21:23 vojtech Exp $

1. Initialization
~~~~~~~~~~~~~~~~~

Expand Down
1 change: 0 additions & 1 deletion Documentation/input/joystick-parport.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
(c) 1998-2000 Vojtech Pavlik <vojtech@ucw.cz>
(c) 1998 Andree Borrmann <a.borrmann@tu-bs.de>
Sponsored by SuSE
$Id: joystick-parport.txt,v 1.6 2001/09/25 09:31:32 vojtech Exp $
----------------------------------------------------------------------------

0. Disclaimer
Expand Down
1 change: 0 additions & 1 deletion Documentation/input/joystick.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Linux Joystick driver v2.0.0
(c) 1996-2000 Vojtech Pavlik <vojtech@ucw.cz>
Sponsored by SuSE
$Id: joystick.txt,v 1.12 2002/03/03 12:13:07 jdeneux Exp $
----------------------------------------------------------------------------

0. Disclaimer
Expand Down
6 changes: 6 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1988,6 +1988,12 @@ M: mikulas@artax.karlin.mff.cuni.cz
W: http://artax.karlin.mff.cuni.cz/~mikulas/vyplody/hpfs/index-e.cgi
S: Maintained

HTCPEN TOUCHSCREEN DRIVER
P: Pau Oliva Fora
M: pof@eslack.org
L: linux-input@vger.kernel.org
S: Maintained

HUGETLB FILESYSTEM
P: William Irwin
M: wli@holomorphy.com
Expand Down
2 changes: 2 additions & 0 deletions drivers/char/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@

extern void ctrl_alt_del(void);

#define to_handle_h(n) container_of(n, struct input_handle, h_node)

/*
* Exported functions/variables
*/
Expand Down
2 changes: 2 additions & 0 deletions drivers/hwmon/hdaps.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,8 @@ static int __init hdaps_init(void)
/* initialize the input class */
idev = hdaps_idev->input;
idev->name = "hdaps";
idev->phys = "isa1600/input0";
idev->id.bustype = BUS_ISA;
idev->dev.parent = &pdev->dev;
idev->evbit[0] = BIT_MASK(EV_ABS);
input_set_abs_params(idev, ABS_X,
Expand Down
12 changes: 7 additions & 5 deletions drivers/input/evbug.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* $Id: evbug.c,v 1.10 2001/09/25 10:12:07 vojtech Exp $
*
* Copyright (c) 1999-2001 Vojtech Pavlik
*/

Expand Down Expand Up @@ -41,7 +39,7 @@ MODULE_LICENSE("GPL");
static void evbug_event(struct input_handle *handle, unsigned int type, unsigned int code, int value)
{
printk(KERN_DEBUG "evbug.c: Event. Dev: %s, Type: %d, Code: %d, Value: %d\n",
handle->dev->phys, type, code, value);
handle->dev->dev.bus_id, type, code, value);
}

static int evbug_connect(struct input_handler *handler, struct input_dev *dev,
Expand All @@ -66,7 +64,10 @@ static int evbug_connect(struct input_handler *handler, struct input_dev *dev,
if (error)
goto err_unregister_handle;

printk(KERN_DEBUG "evbug.c: Connected device: \"%s\", %s\n", dev->name, dev->phys);
printk(KERN_DEBUG "evbug.c: Connected device: %s (%s at %s)\n",
dev->dev.bus_id,
dev->name ?: "unknown",
dev->phys ?: "unknown");

return 0;

Expand All @@ -79,7 +80,8 @@ static int evbug_connect(struct input_handler *handler, struct input_dev *dev,

static void evbug_disconnect(struct input_handle *handle)
{
printk(KERN_DEBUG "evbug.c: Disconnected device: %s\n", handle->dev->phys);
printk(KERN_DEBUG "evbug.c: Disconnected device: %s\n",
handle->dev->dev.bus_id);

input_close_device(handle);
input_unregister_handle(handle);
Expand Down
101 changes: 90 additions & 11 deletions drivers/input/evdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,35 @@ struct input_event_compat {
__s32 value;
};

struct ff_periodic_effect_compat {
__u16 waveform;
__u16 period;
__s16 magnitude;
__s16 offset;
__u16 phase;

struct ff_envelope envelope;

__u32 custom_len;
compat_uptr_t custom_data;
};

struct ff_effect_compat {
__u16 type;
__s16 id;
__u16 direction;
struct ff_trigger trigger;
struct ff_replay replay;

union {
struct ff_constant_effect constant;
struct ff_ramp_effect ramp;
struct ff_periodic_effect_compat periodic;
struct ff_condition_effect condition[2]; /* One for each axis */
struct ff_rumble_effect rumble;
} u;
};

/* Note to the author of this code: did it ever occur to
you why the ifdefs are needed? Think about it again. -AK */
#ifdef CONFIG_X86_64
Expand Down Expand Up @@ -368,6 +397,42 @@ static int evdev_event_to_user(char __user *buffer,
return 0;
}

static int evdev_ff_effect_from_user(const char __user *buffer, size_t size,
struct ff_effect *effect)
{
if (COMPAT_TEST) {
struct ff_effect_compat *compat_effect;

if (size != sizeof(struct ff_effect_compat))
return -EINVAL;

/*
* It so happens that the pointer which needs to be changed
* is the last field in the structure, so we can copy the
* whole thing and replace just the pointer.
*/

compat_effect = (struct ff_effect_compat *)effect;

if (copy_from_user(compat_effect, buffer,
sizeof(struct ff_effect_compat)))
return -EFAULT;

if (compat_effect->type == FF_PERIODIC &&
compat_effect->u.periodic.waveform == FF_CUSTOM)
effect->u.periodic.custom_data =
compat_ptr(compat_effect->u.periodic.custom_data);
} else {
if (size != sizeof(struct ff_effect))
return -EINVAL;

if (copy_from_user(effect, buffer, sizeof(struct ff_effect)))
return -EFAULT;
}

return 0;
}

#else

static inline size_t evdev_event_size(void)
Expand All @@ -393,6 +458,18 @@ static int evdev_event_to_user(char __user *buffer,
return 0;
}

static int evdev_ff_effect_from_user(const char __user *buffer, size_t size,
struct ff_effect *effect)
{
if (size != sizeof(struct ff_effect))
return -EINVAL;

if (copy_from_user(effect, buffer, sizeof(struct ff_effect)))
return -EFAULT;

return 0;
}

#endif /* CONFIG_COMPAT */

static ssize_t evdev_write(struct file *file, const char __user *buffer,
Expand Down Expand Up @@ -633,17 +710,6 @@ static long evdev_do_ioctl(struct file *file, unsigned int cmd,

return input_set_keycode(dev, t, v);

case EVIOCSFF:
if (copy_from_user(&effect, p, sizeof(effect)))
return -EFAULT;

error = input_ff_upload(dev, &effect, file);

if (put_user(effect.id, &(((struct ff_effect __user *)p)->id)))
return -EFAULT;

return error;

case EVIOCRMFF:
return input_ff_erase(dev, (int)(unsigned long) p, file);

Expand Down Expand Up @@ -733,6 +799,19 @@ static long evdev_do_ioctl(struct file *file, unsigned int cmd,

if (_IOC_DIR(cmd) == _IOC_WRITE) {

if (_IOC_NR(cmd) == _IOC_NR(EVIOCSFF)) {

if (evdev_ff_effect_from_user(p, _IOC_SIZE(cmd), &effect))
return -EFAULT;

error = input_ff_upload(dev, &effect, file);

if (put_user(effect.id, &(((struct ff_effect __user *)p)->id)))
return -EFAULT;

return error;
}

if ((_IOC_NR(cmd) & ~ABS_MAX) == _IOC_NR(EVIOCSABS(0))) {

t = _IOC_NR(cmd) & ABS_MAX;
Expand Down
4 changes: 2 additions & 2 deletions drivers/input/ff-memless.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,9 @@ static void ml_combine_effects(struct ff_effect *effect,
* in s8, this should be changed to something more generic
*/
effect->u.ramp.start_level =
max(min(effect->u.ramp.start_level + x, 0x7f), -0x80);
clamp_val(effect->u.ramp.start_level + x, -0x80, 0x7f);
effect->u.ramp.end_level =
max(min(effect->u.ramp.end_level + y, 0x7f), -0x80);
clamp_val(effect->u.ramp.end_level + y, -0x80, 0x7f);
break;

case FF_RUMBLE:
Expand Down
2 changes: 0 additions & 2 deletions drivers/input/gameport/emu10k1-gp.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* $Id: emu10k1-gp.c,v 1.8 2002/01/22 20:40:46 vojtech Exp $
*
* Copyright (c) 2001 Vojtech Pavlik
*/

Expand Down
22 changes: 0 additions & 22 deletions drivers/input/gameport/gameport.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ EXPORT_SYMBOL(__gameport_register_driver);
EXPORT_SYMBOL(gameport_unregister_driver);
EXPORT_SYMBOL(gameport_open);
EXPORT_SYMBOL(gameport_close);
EXPORT_SYMBOL(gameport_rescan);
EXPORT_SYMBOL(gameport_set_phys);
EXPORT_SYMBOL(gameport_start_polling);
EXPORT_SYMBOL(gameport_stop_polling);
Expand Down Expand Up @@ -230,8 +229,6 @@ static void gameport_find_driver(struct gameport *gameport)
*/

enum gameport_event_type {
GAMEPORT_RESCAN,
GAMEPORT_RECONNECT,
GAMEPORT_REGISTER_PORT,
GAMEPORT_REGISTER_DRIVER,
};
Expand Down Expand Up @@ -365,15 +362,6 @@ static void gameport_handle_event(void)
gameport_add_port(event->object);
break;

case GAMEPORT_RECONNECT:
gameport_reconnect_port(event->object);
break;

case GAMEPORT_RESCAN:
gameport_disconnect_port(event->object);
gameport_find_driver(event->object);
break;

case GAMEPORT_REGISTER_DRIVER:
gameport_add_driver(event->object);
break;
Expand Down Expand Up @@ -651,16 +639,6 @@ static void gameport_disconnect_port(struct gameport *gameport)
device_release_driver(&gameport->dev);
}

void gameport_rescan(struct gameport *gameport)
{
gameport_queue_event(gameport, NULL, GAMEPORT_RESCAN);
}

void gameport_reconnect(struct gameport *gameport)
{
gameport_queue_event(gameport, NULL, GAMEPORT_RECONNECT);
}

/*
* Submits register request to kgameportd for subsequent execution.
* Note that port registration is always asynchronous.
Expand Down
2 changes: 0 additions & 2 deletions drivers/input/gameport/lightning.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* $Id: lightning.c,v 1.20 2002/01/22 20:41:31 vojtech Exp $
*
* Copyright (c) 1998-2001 Vojtech Pavlik
*/

Expand Down
2 changes: 0 additions & 2 deletions drivers/input/gameport/ns558.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* $Id: ns558.c,v 1.43 2002/01/24 19:23:21 vojtech Exp $
*
* Copyright (c) 1999-2001 Vojtech Pavlik
* Copyright (c) 1999 Brian Gerst
*/
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ static void input_handle_event(struct input_dev *dev,
break;
}

if (type != EV_SYN)
if (disposition != INPUT_IGNORE_EVENT && type != EV_SYN)
dev->sync = 0;

if ((disposition & INPUT_PASS_TO_DEVICE) && dev->event)
Expand Down
2 changes: 0 additions & 2 deletions drivers/input/joystick/a3d.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* $Id: a3d.c,v 1.21 2002/01/22 20:11:50 vojtech Exp $
*
* Copyright (c) 1998-2001 Vojtech Pavlik
*/

Expand Down
2 changes: 0 additions & 2 deletions drivers/input/joystick/amijoy.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* $Id: amijoy.c,v 1.13 2002/01/22 20:26:32 vojtech Exp $
*
* Copyright (c) 1998-2001 Vojtech Pavlik
*/

Expand Down
2 changes: 0 additions & 2 deletions drivers/input/joystick/cobra.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* $Id: cobra.c,v 1.19 2002/01/22 20:26:52 vojtech Exp $
*
* Copyright (c) 1999-2001 Vojtech Pavlik
*/

Expand Down
2 changes: 0 additions & 2 deletions drivers/input/joystick/db9.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* $Id: db9.c,v 1.13 2002/04/07 20:13:37 vojtech Exp $
*
* Copyright (c) 1999-2001 Vojtech Pavlik
*
* Based on the work of:
Expand Down
2 changes: 0 additions & 2 deletions drivers/input/joystick/gf2k.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* $Id: gf2k.c,v 1.19 2002/01/22 20:27:43 vojtech Exp $
*
* Copyright (c) 1998-2001 Vojtech Pavlik
*/

Expand Down
2 changes: 0 additions & 2 deletions drivers/input/joystick/grip.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* $Id: grip.c,v 1.21 2002/01/22 20:27:57 vojtech Exp $
*
* Copyright (c) 1998-2001 Vojtech Pavlik
*/

Expand Down
2 changes: 0 additions & 2 deletions drivers/input/joystick/grip_mp.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* $Id: grip_mp.c,v 1.9 2002/07/20 19:28:45 bonnland Exp $
*
* Driver for the Gravis Grip Multiport, a gamepad "hub" that
* connects up to four 9-pin digital gamepads/joysticks.
* Driver tested on SMP and UP kernel versions 2.4.18-4 and 2.4.18-5.
Expand Down
2 changes: 0 additions & 2 deletions drivers/input/joystick/guillemot.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* $Id: guillemot.c,v 1.10 2002/01/22 20:28:12 vojtech Exp $
*
* Copyright (c) 2001 Vojtech Pavlik
*/

Expand Down
2 changes: 0 additions & 2 deletions drivers/input/joystick/iforce/iforce-ff.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* $Id: iforce-ff.c,v 1.9 2002/02/02 19:28:35 jdeneux Exp $
*
* Copyright (c) 2000-2002 Vojtech Pavlik <vojtech@ucw.cz>
* Copyright (c) 2001-2002, 2007 Johann Deneux <johann.deneux@gmail.com>
*
Expand Down
Loading

0 comments on commit 519f014

Please sign in to comment.