]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
media: staging: rkisp1: remove macro RKISP1_DIR_SINK_SRC
authorDafna Hirschfeld <dafna.hirschfeld@collabora.com>
Thu, 18 Jun 2020 11:35:16 +0000 (13:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Aug 2020 11:07:32 +0000 (13:07 +0200)
[ Upstream commit b861d139a36a4593498932bfec957bdcc7d98eb3 ]

The macro RKISP1_DIR_SINK_SRC is a mask of two flags.
The macro hides the fact that it's a mask and the code
is actually more clear if we replace it the with bitwise-or explicitly.

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Acked-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/media/rkisp1/rkisp1-isp.c

index fa53f05e37d8117c439e06da398475381a71c925..31c5ae2aa29fbd8d460bbe6b74557bc0ace99108 100644 (file)
@@ -25,7 +25,6 @@
 
 #define RKISP1_DIR_SRC BIT(0)
 #define RKISP1_DIR_SINK BIT(1)
-#define RKISP1_DIR_SINK_SRC (RKISP1_DIR_SINK | RKISP1_DIR_SRC)
 
 /*
  * NOTE: MIPI controller and input MUX are also configured in this file.
@@ -69,84 +68,84 @@ static const struct rkisp1_isp_mbus_info rkisp1_isp_formats[] = {
                .mipi_dt        = RKISP1_CIF_CSI2_DT_RAW10,
                .bayer_pat      = RKISP1_RAW_RGGB,
                .bus_width      = 10,
-               .direction      = RKISP1_DIR_SINK_SRC,
+               .direction      = RKISP1_DIR_SINK | RKISP1_DIR_SRC,
        }, {
                .mbus_code      = MEDIA_BUS_FMT_SBGGR10_1X10,
                .fmt_type       = RKISP1_FMT_BAYER,
                .mipi_dt        = RKISP1_CIF_CSI2_DT_RAW10,
                .bayer_pat      = RKISP1_RAW_BGGR,
                .bus_width      = 10,
-               .direction      = RKISP1_DIR_SINK_SRC,
+               .direction      = RKISP1_DIR_SINK | RKISP1_DIR_SRC,
        }, {
                .mbus_code      = MEDIA_BUS_FMT_SGBRG10_1X10,
                .fmt_type       = RKISP1_FMT_BAYER,
                .mipi_dt        = RKISP1_CIF_CSI2_DT_RAW10,
                .bayer_pat      = RKISP1_RAW_GBRG,
                .bus_width      = 10,
-               .direction      = RKISP1_DIR_SINK_SRC,
+               .direction      = RKISP1_DIR_SINK | RKISP1_DIR_SRC,
        }, {
                .mbus_code      = MEDIA_BUS_FMT_SGRBG10_1X10,
                .fmt_type       = RKISP1_FMT_BAYER,
                .mipi_dt        = RKISP1_CIF_CSI2_DT_RAW10,
                .bayer_pat      = RKISP1_RAW_GRBG,
                .bus_width      = 10,
-               .direction      = RKISP1_DIR_SINK_SRC,
+               .direction      = RKISP1_DIR_SINK | RKISP1_DIR_SRC,
        }, {
                .mbus_code      = MEDIA_BUS_FMT_SRGGB12_1X12,
                .fmt_type       = RKISP1_FMT_BAYER,
                .mipi_dt        = RKISP1_CIF_CSI2_DT_RAW12,
                .bayer_pat      = RKISP1_RAW_RGGB,
                .bus_width      = 12,
-               .direction      = RKISP1_DIR_SINK_SRC,
+               .direction      = RKISP1_DIR_SINK | RKISP1_DIR_SRC,
        }, {
                .mbus_code      = MEDIA_BUS_FMT_SBGGR12_1X12,
                .fmt_type       = RKISP1_FMT_BAYER,
                .mipi_dt        = RKISP1_CIF_CSI2_DT_RAW12,
                .bayer_pat      = RKISP1_RAW_BGGR,
                .bus_width      = 12,
-               .direction      = RKISP1_DIR_SINK_SRC,
+               .direction      = RKISP1_DIR_SINK | RKISP1_DIR_SRC,
        }, {
                .mbus_code      = MEDIA_BUS_FMT_SGBRG12_1X12,
                .fmt_type       = RKISP1_FMT_BAYER,
                .mipi_dt        = RKISP1_CIF_CSI2_DT_RAW12,
                .bayer_pat      = RKISP1_RAW_GBRG,
                .bus_width      = 12,
-               .direction      = RKISP1_DIR_SINK_SRC,
+               .direction      = RKISP1_DIR_SINK | RKISP1_DIR_SRC,
        }, {
                .mbus_code      = MEDIA_BUS_FMT_SGRBG12_1X12,
                .fmt_type       = RKISP1_FMT_BAYER,
                .mipi_dt        = RKISP1_CIF_CSI2_DT_RAW12,
                .bayer_pat      = RKISP1_RAW_GRBG,
                .bus_width      = 12,
-               .direction      = RKISP1_DIR_SINK_SRC,
+               .direction      = RKISP1_DIR_SINK | RKISP1_DIR_SRC,
        }, {
                .mbus_code      = MEDIA_BUS_FMT_SRGGB8_1X8,
                .fmt_type       = RKISP1_FMT_BAYER,
                .mipi_dt        = RKISP1_CIF_CSI2_DT_RAW8,
                .bayer_pat      = RKISP1_RAW_RGGB,
                .bus_width      = 8,
-               .direction      = RKISP1_DIR_SINK_SRC,
+               .direction      = RKISP1_DIR_SINK | RKISP1_DIR_SRC,
        }, {
                .mbus_code      = MEDIA_BUS_FMT_SBGGR8_1X8,
                .fmt_type       = RKISP1_FMT_BAYER,
                .mipi_dt        = RKISP1_CIF_CSI2_DT_RAW8,
                .bayer_pat      = RKISP1_RAW_BGGR,
                .bus_width      = 8,
-               .direction      = RKISP1_DIR_SINK_SRC,
+               .direction      = RKISP1_DIR_SINK | RKISP1_DIR_SRC,
        }, {
                .mbus_code      = MEDIA_BUS_FMT_SGBRG8_1X8,
                .fmt_type       = RKISP1_FMT_BAYER,
                .mipi_dt        = RKISP1_CIF_CSI2_DT_RAW8,
                .bayer_pat      = RKISP1_RAW_GBRG,
                .bus_width      = 8,
-               .direction      = RKISP1_DIR_SINK_SRC,
+               .direction      = RKISP1_DIR_SINK | RKISP1_DIR_SRC,
        }, {
                .mbus_code      = MEDIA_BUS_FMT_SGRBG8_1X8,
                .fmt_type       = RKISP1_FMT_BAYER,
                .mipi_dt        = RKISP1_CIF_CSI2_DT_RAW8,
                .bayer_pat      = RKISP1_RAW_GRBG,
                .bus_width      = 8,
-               .direction      = RKISP1_DIR_SINK_SRC,
+               .direction      = RKISP1_DIR_SINK | RKISP1_DIR_SRC,
        }, {
                .mbus_code      = MEDIA_BUS_FMT_YUYV8_1X16,
                .fmt_type       = RKISP1_FMT_YUV,