From b6f9c071a2a9535c93366aab4dab66467e6ece0a Mon Sep 17 00:00:00 2001 From: himta ram Date: Tue, 3 Dec 2019 14:45:03 +0530 Subject: [PATCH] media: v4l2-core: guard code against ABI breakage Guard the code against ABI breakage using IS_ENABLED Helper macro. Guarded code will be compiled when config is set to m or y. CRs-Fixed: 2579332 Change-Id: Ic1a5ab22c8ced2c7b527bf5086c2c7b14fe24919 Signed-off-by: himta ram --- drivers/media/v4l2-core/v4l2-ioctl.c | 2 +- include/media/v4l2-ioctl.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 0fde379e5cd9..c1ae2f11a0e8 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -1003,7 +1003,7 @@ static int check_fmt(struct file *file, enum v4l2_buf_type type) if (is_vid && is_tx && ops->vidioc_g_fmt_meta_out) return 0; break; -#ifdef CONFIG_I2C_RTC6226_QCA +#if IS_ENABLED(CONFIG_I2C_RTC6226_QCA) case V4L2_BUF_TYPE_PRIVATE: if (ops->vidioc_g_fmt_type_private) return 0; diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h index d8dc2bc8a8f3..5474323f7c5f 100644 --- a/include/media/v4l2-ioctl.h +++ b/include/media/v4l2-ioctl.h @@ -345,7 +345,7 @@ struct v4l2_ioctl_ops { struct v4l2_format *f); int (*vidioc_g_fmt_meta_out)(struct file *file, void *fh, struct v4l2_format *f); -#ifdef CONFIG_I2C_RTC6226_QCA +#if IS_ENABLED(CONFIG_I2C_RTC6226_QCA) int (*vidioc_g_fmt_type_private)(struct file *file, void *fh, struct v4l2_format *f); #endif