diff --git a/drivers/gpu/nvgpu/common/linux/ioctl.c b/drivers/gpu/nvgpu/common/linux/ioctl.c index 0aa7f6a3d..04974786d 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl.c @@ -103,6 +103,7 @@ static const struct file_operations gk20a_tsg_ops = { .unlocked_ioctl = nvgpu_ioctl_tsg_dev_ioctl, }; +#ifdef CONFIG_GK20A_CTXSW_TRACE static const struct file_operations gk20a_ctxsw_ops = { .owner = THIS_MODULE, .release = gk20a_ctxsw_dev_release, @@ -115,6 +116,7 @@ static const struct file_operations gk20a_ctxsw_ops = { .read = gk20a_ctxsw_dev_read, .mmap = gk20a_ctxsw_dev_mmap, }; +#endif static const struct file_operations gk20a_sched_ops = { .owner = THIS_MODULE, @@ -270,7 +272,7 @@ int gk20a_user_init(struct device *dev, const char *interface_name, if (err) goto fail; -#ifdef CONFIG_GK20A_CTXSW_TRACE +#if defined(CONFIG_GK20A_CTXSW_TRACE) err = gk20a_create_device(dev, devno++, interface_name, "-ctxsw", &l->ctxsw.cdev, &l->ctxsw.node, &gk20a_ctxsw_ops,