Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
[pandora-kernel.git] / drivers / media / video / cx88 / cx88-core.c
index b045874..f2fb9f3 100644 (file)
@@ -991,7 +991,7 @@ int cx88_set_tvnorm(struct cx88_core *core, v4l2_std_id norm)
        set_tvaudio(core);
 
        // tell i2c chips
-       cx88_call_i2c_clients(core,VIDIOC_S_STD,&norm);
+       call_all(core, tuner, s_std, norm);
 
        // done
        return 0;
@@ -1011,7 +1011,8 @@ struct video_device *cx88_vdev_init(struct cx88_core *core,
                return NULL;
        *vfd = *template;
        vfd->minor   = -1;
-       vfd->parent  = &pci->dev;
+       vfd->v4l2_dev = &core->v4l2_dev;
+       vfd->parent = &pci->dev;
        vfd->release = video_device_release;
        snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)",
                 core->name, type, core->board.name);
@@ -1058,12 +1059,16 @@ void cx88_core_put(struct cx88_core *core, struct pci_dev *pci)
 
        mutex_lock(&devlist);
        cx88_ir_fini(core);
-       if (0 == core->i2c_rc)
+       if (0 == core->i2c_rc) {
+               if (core->i2c_rtc)
+                       i2c_unregister_device(core->i2c_rtc);
                i2c_del_adapter(&core->i2c_adap);
+       }
        list_del(&core->devlist);
        iounmap(core->lmmio);
        cx88_devcount--;
        mutex_unlock(&devlist);
+       v4l2_device_unregister(&core->v4l2_dev);
        kfree(core);
 }