summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/host/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/tegra/host/dev.c')
-rw-r--r--drivers/video/tegra/host/dev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/video/tegra/host/dev.c b/drivers/video/tegra/host/dev.c
index 38efa0975a2e..4ab0f1e0c106 100644
--- a/drivers/video/tegra/host/dev.c
+++ b/drivers/video/tegra/host/dev.c
@@ -125,7 +125,7 @@ static int nvhost_channelrelease(struct inode *inode, struct file *filp)
nvhost_putchannel(priv->ch, priv->hwctx);
if (priv->hwctx)
- priv->ch->ctxhandler.put(priv->hwctx);
+ priv->ch->ctxhandler->put(priv->hwctx);
if (priv->job)
nvhost_job_put(priv->job);
@@ -155,8 +155,8 @@ static int nvhost_channelopen(struct inode *inode, struct file *filp)
priv->ch = ch;
nvhost_module_add_client(ch->dev, priv);
- if (ch->ctxhandler.alloc) {
- priv->hwctx = ch->ctxhandler.alloc(ch);
+ if (ch->ctxhandler && ch->ctxhandler->alloc) {
+ priv->hwctx = ch->ctxhandler->alloc(ch->ctxhandler, ch);
if (!priv->hwctx)
goto fail;
}