Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43856
b: refs/heads/master
c: aa938f7
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Kosina authored and Greg Kroah-Hartman committed Dec 8, 2006
1 parent d0a67c4 commit 7390368
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4916b3a57fc94664677d439b911b8aaf86c7ec23
refs/heads/master: aa938f7974b82cfd9ee955031987344f332b7c77
6 changes: 4 additions & 2 deletions trunk/drivers/hid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -819,8 +819,8 @@ static void hid_process_event(struct hid_device *hid, struct hid_field *field, s
hid_dump_input(usage, value);
if (hid->claimed & HID_CLAIMED_INPUT)
hidinput_hid_event(hid, field, usage, value);
if (hid->claimed & HID_CLAIMED_HIDDEV && interrupt)
hiddev_hid_event(hid, field, usage, value);
if (hid->claimed & HID_CLAIMED_HIDDEV && interrupt && hid->hiddev_hid_event)
hid->hiddev_hid_event(hid, field, usage, value);
}

/*
Expand Down Expand Up @@ -940,3 +940,5 @@ int hid_set_field(struct hid_field *field, unsigned offset, __s32 value)
}
EXPORT_SYMBOL_GPL(hid_set_field);

MODULE_LICENSE(DRIVER_LICENSE);

3 changes: 3 additions & 0 deletions trunk/drivers/usb/input/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1284,6 +1284,9 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf)
hid->hidinput_input_event = usb_hidinput_input_event;
hid->hidinput_open = hidinput_open;
hid->hidinput_close = hidinput_close;
#ifdef CONFIG_USB_HIDDEV
hid->hiddev_hid_event = hiddev_hid_event;
#endif

return hid;

Expand Down
8 changes: 4 additions & 4 deletions trunk/include/linux/hid.h
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,10 @@ struct hid_device { /* device report descriptor */
int (*hidinput_open) (struct input_dev *);
void (*hidinput_close) (struct input_dev *);

/* hiddev event handler */
void (*hiddev_hid_event) (struct hid_device *, struct hid_field *field,
struct hid_usage *, __s32);

#ifdef CONFIG_USB_HIDINPUT_POWERBOOK
unsigned long pb_pressed_fn[NBITS(KEY_MAX)];
unsigned long pb_pressed_numlock[NBITS(KEY_MAX)];
Expand Down Expand Up @@ -477,13 +481,9 @@ struct hid_descriptor {
#define resolv_event(a,b) do { } while (0)
#endif

#ifdef CONFIG_HID
/* Applications from HID Usage Tables 4/8/99 Version 1.1 */
/* We ignore a few input applications that are not widely used */
#define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001))
#else
#define IS_INPUT_APPLICATION(a) (0)
#endif

/* HID core API */
extern void hidinput_hid_event(struct hid_device *, struct hid_field *, struct hid_usage *, __s32);
Expand Down

0 comments on commit 7390368

Please sign in to comment.