Thread (13 messages) 13 messages, 3 authors, 2012-01-16

Re: [RFC PATCH 2/3] radio-keene: add a driver for the Keene FM Transmitter.

flat view

From: Hans Verkuil <hidden>
Date: 2012-01-16 13:03:20
Also in: linux-media

On Monday 16 January 2012 13:46:46 Oliver Neukum wrote:
Am Montag, 16. Januar 2012, 13:29:19 schrieb Hans Verkuil:
quoted
+/* check if the device is present and register with v4l and usb if it is
*/ +static int usb_keene_probe(struct usb_interface *intf,
+                               const struct usb_device_id *id)
+{
+       struct keene_device *radio;
+       struct v4l2_ctrl_handler *hdl;
+       int retval = 0;
+
+       radio = kzalloc(sizeof(struct keene_device), GFP_KERNEL);
+
+       if (!radio) {
+               dev_err(&intf->dev, "kmalloc for keene_device failed\n");
+               retval = -ENOMEM;
+               goto err;
+       }
Oh, I forgot. You have no guarantee the hid driver is already loaded.
This driver needs to also gracefully handle being called for a HID
device.
And how do I do that? Do you have a pointer to another driver for me?

Regards,

	Hans
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help