]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: t210: vi: unregister slcg notifier
authorBryan Wu <pengw@nvidia.com>
Sat, 13 Dec 2014 00:59:25 +0000 (16:59 -0800)
committerVenkat Moganty <vmoganty@nvidia.com>
Sat, 20 Dec 2014 14:29:13 +0000 (06:29 -0800)
VI driver needs to be a module, then notifier should be unregistered when
unloading the module. This patch adds unregister routine.

Also export t21_vi_info structure for modulize the driver.

Bug 1589880

Change-Id: Ia9533e470128dc9ff7c8e7255e6ff5dec3d90339
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/663540
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Tested-by: Venkat Moganty <vmoganty@nvidia.com>
drivers/video/tegra/host/t210/t210.c
drivers/video/tegra/host/vi/vi.c

index 6e1b1640ad594f644020fe3f674afe7b7c3be92b..56e17f576b93ce7002cd0ced5f4c3752dd554766 100644 (file)
@@ -161,6 +161,7 @@ struct nvhost_device_data t21_vi_info = {
        .prepare_poweroff = nvhost_vi_prepare_poweroff,
        .finalize_poweron = nvhost_vi_finalize_poweron,
 };
+EXPORT_SYMBOL(t21_vi_info);
 #else
 struct nvhost_device_data t21_vib_info = {
        .modulemutexes          = {NVMODMUTEX_VI_1},
@@ -225,6 +226,7 @@ struct nvhost_device_data t21_vi_info = {
        .prepare_poweroff = nvhost_vi_prepare_poweroff,
        .finalize_poweron = nvhost_vi_finalize_poweron,
 };
+EXPORT_SYMBOL(t21_vi_info);
 #endif
 
 #endif
index d81e747842e73a88bdba3807000b929f477df63e..121af90505c135015b77aacb29dd33416075d0f5 100644 (file)
@@ -337,6 +337,11 @@ static int __exit vi_remove(struct platform_device *dev)
 
        vi_intr_free(tegra_vi);
 
+       if (pdata->slcg_notifier_enable &&
+           (pdata->powergate_ids[0] != -1))
+               slcg_unregister_notifier(pdata->powergate_ids[0],
+                                        &pdata->toggle_slcg_notifier);
+
        nvhost_client_device_release(dev);
        pdata->aperture[0] = NULL;