Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183129
b: refs/heads/master
c: b036f6f
h: refs/heads/master
i:
  183127: a905659
v: v3
  • Loading branch information
Bastian Blank authored and Dmitry Torokhov committed Feb 11, 2010
1 parent 7f2bc31 commit 0c1f7a4
Show file tree
Hide file tree
Showing 4 changed files with 206 additions and 153 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: 5deeac99fe1146532eb7c64f9adb17d17628d751
refs/heads/master: b036f6fb3aa23a52d90da5fc57e0803f08292e82
5 changes: 3 additions & 2 deletions trunk/drivers/input/tablet/wacom.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/init.h>
#include <linux/usb/input.h>
#include <asm/unaligned.h>
Expand Down Expand Up @@ -120,6 +121,8 @@ struct wacom_combo {
struct urb *urb;
};

extern const struct usb_device_id wacom_ids[];

extern int wacom_wac_irq(struct wacom_wac * wacom_wac, void * wcombo);
extern void wacom_report_abs(void *wcombo, unsigned int abs_type, int abs_data);
extern void wacom_report_rel(void *wcombo, unsigned int rel_type, int rel_data);
Expand All @@ -142,7 +145,5 @@ extern void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wa
extern void input_dev_bee(struct input_dev *input_dev, struct wacom_wac *wacom_wac);
extern __u16 wacom_le16_to_cpu(unsigned char *data);
extern __u16 wacom_be16_to_cpu(unsigned char *data);
extern struct wacom_features *get_wacom_feature(const struct usb_device_id *id);
extern const struct usb_device_id *get_device_table(void);

#endif
10 changes: 7 additions & 3 deletions trunk/drivers/input/tablet/wacom_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,10 +530,13 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
struct usb_endpoint_descriptor *endpoint;
struct wacom *wacom;
struct wacom_wac *wacom_wac;
struct wacom_features *features;
struct wacom_features *features = (void *)id->driver_info;
struct input_dev *input_dev;
int error = -ENOMEM;

if (!features)
return -EINVAL;

wacom = kzalloc(sizeof(struct wacom), GFP_KERNEL);
wacom_wac = kzalloc(sizeof(struct wacom_wac), GFP_KERNEL);
input_dev = input_allocate_device();
Expand All @@ -555,7 +558,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
usb_make_path(dev, wacom->phys, sizeof(wacom->phys));
strlcat(wacom->phys, "/input0", sizeof(wacom->phys));

wacom_wac->features = features = get_wacom_feature(id);
wacom_wac->features = features;
BUG_ON(features->pktlen > WACOM_PKGLEN_MAX);

input_dev->name = wacom_wac->features->name;
Expand Down Expand Up @@ -663,6 +666,7 @@ static int wacom_reset_resume(struct usb_interface *intf)

static struct usb_driver wacom_driver = {
.name = "wacom",
.id_table = wacom_ids,
.probe = wacom_probe,
.disconnect = wacom_disconnect,
.suspend = wacom_suspend,
Expand All @@ -674,7 +678,7 @@ static struct usb_driver wacom_driver = {
static int __init wacom_init(void)
{
int result;
wacom_driver.id_table = get_device_table();

result = usb_register(&wacom_driver);
if (result == 0)
printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
Expand Down
Loading

0 comments on commit 0c1f7a4

Please sign in to comment.