static void cx88_ir_start(struct cx88_core *core, struct cx88_IR *ir)
{
if (ir->polling) {
- INIT_WORK(&ir->work, cx88_ir_work, ir);
+ INIT_WORK(&ir->work, cx88_ir_work);
init_timer(&ir->timer);
ir->timer.function = ir_timer;
ir->timer.data = (unsigned long)ir;
return errCode;
}
-
/*
* usbvision_set_video_format()
*
*/
// to call usbvision_power_off from task queue
-static void call_usbvision_power_off(void *_usbvision)
+static void call_usbvision_power_off(struct work_struct *work)
{
- struct usb_usbvision *usbvision = _usbvision;
+ struct usb_usbvision *usbvision = container_of(work, struct usb_usbvision, work);
PDEBUG(DBG_FUNC, "");
down_interruptible(&usbvision->lock);
if(usbvision->user == 0) {
usbvision_i2c_usb_del_bus(&usbvision->i2c_adap);
+
usbvision_power_off(usbvision);
usbvision->initialized = 0;
}
PDEBUG(DBG_FUNC, "");
del_timer(&usbvision->powerOffTimer);
- INIT_WORK(&usbvision->powerOffWork, call_usbvision_power_off, usbvision);
+ INIT_WORK(&usbvision->powerOffWork, call_usbvision_power_off);
(void) schedule_work(&usbvision->powerOffWork);
}
struct video_device *rdev; /* Radio Device */
struct video_device *vbi; /* VBI Device */
+ struct work_struct work;
+
/* i2c Declaration Section*/
struct i2c_adapter i2c_adap;
struct i2c_algo_usb_data i2c_algo;