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

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

From: Oliver Neukum <hidden>
Date: 2012-01-16 12:44:57
Also in: linux-media

Am Montag, 16. Januar 2012, 13:29:19 schrieb Hans Verkuil:
+/* 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.

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