diff --git a/drivers/media/platform/tegra/camera/tegracam_v4l2.c b/drivers/media/platform/tegra/camera/tegracam_v4l2.c index f348171e..ed1d3c2b 100644 --- a/drivers/media/platform/tegra/camera/tegracam_v4l2.c +++ b/drivers/media/platform/tegra/camera/tegracam_v4l2.c @@ -218,7 +218,7 @@ int tegracam_v4l2subdev_register(struct tegracam_device *tc_dev, /* Set owner to NULL so we can unload the driver module */ sd->owner = NULL; -#if defined(CONFIG_MEDIA_CONTROLLER) +#if IS_ENABLED(CONFIG_MEDIA_CONTROLLER) tc_dev->pad.flags = MEDIA_PAD_FL_SOURCE; sd->entity.ops = &media_ops; err = tegra_media_entity_init(&sd->entity, @@ -245,7 +245,7 @@ void tegracam_v4l2subdev_unregister(struct tegracam_device *tc_dev) v4l2_ctrl_handler_free(s_data->ctrl_handler); v4l2_async_unregister_subdev(sd); -#if defined(CONFIG_MEDIA_CONTROLLER) +#if IS_ENABLED(CONFIG_MEDIA_CONTROLLER) media_entity_cleanup(&sd->entity); #endif } diff --git a/drivers/media/platform/tegra/camera/vi/channel.c b/drivers/media/platform/tegra/camera/vi/channel.c index 41585760..90726e6b 100644 --- a/drivers/media/platform/tegra/camera/vi/channel.c +++ b/drivers/media/platform/tegra/camera/vi/channel.c @@ -746,7 +746,7 @@ static int tegra_channel_buffer_prepare(struct vb2_buffer *vb) buf->chan = chan; vb2_set_plane_payload(&vbuf->vb2_buf, 0, chan->format.sizeimage); -#if defined(CONFIG_VIDEOBUF2_DMA_CONTIG) +#if IS_ENABLED(CONFIG_VIDEOBUF2_DMA_CONTIG) buf->addr = vb2_dma_contig_plane_dma_addr(vb, 0); #endif @@ -2562,7 +2562,7 @@ int tegra_channel_init(struct tegra_channel *chan) /* Init bpl factor to 1, will be overidden based on interlace_type */ chan->interlace_bplfactor = 1; -#if defined(CONFIG_VIDEOBUF2_DMA_CONTIG) +#if IS_ENABLED(CONFIG_VIDEOBUF2_DMA_CONTIG) /* get the buffers queue... */ ret = tegra_vb2_dma_init(vi_unit_dev, &chan->alloc_ctx, SZ_64K, &vi->vb2_dma_alloc_refcnt); @@ -2577,7 +2577,7 @@ int tegra_channel_init(struct tegra_channel *chan) chan->queue.drv_priv = chan; chan->queue.buf_struct_size = sizeof(struct tegra_channel_buffer); chan->queue.ops = &tegra_channel_queue_qops; -#if defined(CONFIG_VIDEOBUF2_DMA_CONTIG) +#if IS_ENABLED(CONFIG_VIDEOBUF2_DMA_CONTIG) chan->queue.mem_ops = &vb2_dma_contig_memops; #endif chan->queue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC @@ -2602,7 +2602,7 @@ int tegra_channel_init(struct tegra_channel *chan) deskew_ctx_err: devm_kfree(vi->dev, chan->deskew_ctx); vb2_queue_error: -#if defined(CONFIG_VIDEOBUF2_DMA_CONTIG) +#if IS_ENABLED(CONFIG_VIDEOBUF2_DMA_CONTIG) tegra_vb2_dma_cleanup(vi_unit_dev, chan->alloc_ctx, &vi->vb2_dma_alloc_refcnt); vb2_init_error: @@ -2638,7 +2638,7 @@ int tegra_channel_cleanup(struct tegra_channel *chan) v4l2_ctrl_handler_free(&chan->ctrl_handler); mutex_lock(&chan->video_lock); vb2_queue_release(&chan->queue); -#if defined(CONFIG_VIDEOBUF2_DMA_CONTIG) +#if IS_ENABLED(CONFIG_VIDEOBUF2_DMA_CONTIG) tegra_vb2_dma_cleanup(vi_unit_dev, chan->alloc_ctx, &chan->vi->vb2_dma_alloc_refcnt); #endif