Esempio n. 1
0
static int vp702x_usb_probe(struct usb_interface *intf,
		const struct usb_device_id *id)
{
	struct dvb_usb_device *d;
	struct vp702x_device_state *st;
	int ret;

	ret = dvb_usb_device_init(intf, &vp702x_properties,
				   THIS_MODULE, &d, adapter_nr);
	if (ret)
		goto out;

	st = d->priv;
	st->buf_len = 16;
	st->buf = kmalloc(st->buf_len, GFP_KERNEL);
	if (!st->buf) {
		ret = -ENOMEM;
		dvb_usb_device_exit(intf);
		goto out;
	}
	mutex_init(&st->buf_mutex);

out:
	return ret;

}
Esempio n. 2
0
static void vp702x_usb_disconnect(struct usb_interface *intf)
{
	struct dvb_usb_device *d = usb_get_intfdata(intf);
	struct vp702x_device_state *st = d->priv;
	mutex_lock(&st->buf_mutex);
	kfree(st->buf);
	mutex_unlock(&st->buf_mutex);
	dvb_usb_device_exit(intf);
}
Esempio n. 3
0
void lme2510_exit(struct usb_interface *intf)
{
	struct dvb_usb_device *d = usb_get_intfdata(intf);
	void *usb_buffer;

	if (d != NULL) {
		usb_buffer = lme2510_exit_int(d);
		dvb_usb_device_exit(intf);
		kfree(usb_buffer);
	}
}
Esempio n. 4
0
static int vp7045_usb_probe(struct usb_interface *intf,
		const struct usb_device_id *id)
{
	struct dvb_usb_device *d;
	int ret = dvb_usb_device_init(intf, &vp7045_properties,
				   THIS_MODULE, &d, adapter_nr);
	if (ret)
		return ret;

	d->priv = kmalloc(20, GFP_KERNEL);
	if (!d->priv) {
		dvb_usb_device_exit(intf);
		return -ENOMEM;
	}

	return ret;
}
static void rtl2832u_usb_disconnect(struct usb_interface *intf)
{
	try_module_get(THIS_MODULE);
	dvb_usb_device_exit(intf);	
}
Esempio n. 6
0
static void az6007_usb_disconnect(struct usb_interface *intf)
{
	struct dvb_usb_device *d = usb_get_intfdata(intf);
	az6007_ci_uninit(d);
	dvb_usb_device_exit(intf);
}
Esempio n. 7
0
static void vp7045_usb_disconnect(struct usb_interface *intf)
{
	struct dvb_usb_device *d = usb_get_intfdata(intf);
	kfree(d->priv);
	dvb_usb_device_exit(intf);
}