Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137731
b: refs/heads/master
c: f180152
h: refs/heads/master
i:
  137729: ff59ba8
  137727: 1000854
v: v3
  • Loading branch information
Laurent Pinchart authored and Mauro Carvalho Chehab committed Mar 30, 2009
1 parent 3380c24 commit 5dfaf5c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 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: efdc8a9585ce02e70e538e46f235aefd63a3f8da
refs/heads/master: f180152376c984a6faa9decb8f2811c373da9141
16 changes: 4 additions & 12 deletions trunk/drivers/media/video/uvc/uvc_status.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,19 @@
#ifdef CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV
static int uvc_input_init(struct uvc_device *dev)
{
struct usb_device *udev = dev->udev;
struct input_dev *input;
char *phys = NULL;
int ret;

input = input_allocate_device();
if (input == NULL)
return -ENOMEM;

phys = kmalloc(6 + strlen(udev->bus->bus_name) + strlen(udev->devpath),
GFP_KERNEL);
if (phys == NULL) {
ret = -ENOMEM;
goto error;
}
sprintf(phys, "usb-%s-%s", udev->bus->bus_name, udev->devpath);
usb_make_path(dev->udev, dev->input_phys, sizeof(dev->input_phys));
strlcat(dev->input_phys, "/button", sizeof(dev->input_phys));

input->name = dev->name;
input->phys = phys;
usb_to_input_id(udev, &input->id);
input->phys = dev->input_phys;
usb_to_input_id(dev->udev, &input->id);
input->dev.parent = &dev->intf->dev;

__set_bit(EV_KEY, input->evbit);
Expand All @@ -57,7 +50,6 @@ static int uvc_input_init(struct uvc_device *dev)

error:
input_free_device(input);
kfree(phys);
return ret;
}

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/video/uvc/uvcvideo.h
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,7 @@ struct uvc_device {
struct urb *int_urb;
__u8 *status;
struct input_dev *input;
char input_phys[64];

/* Video Streaming interfaces */
struct list_head streaming;
Expand Down

0 comments on commit 5dfaf5c

Please sign in to comment.