summaryrefslogtreecommitdiff
path: root/drivers/staging/media
diff options
context:
space:
mode:
authorMadhumitha Prabakaran <madhumithabiw@gmail.com>2019-03-25 11:42:55 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-26 05:44:54 +0900
commit993e826884e542cc1602bfaba0b63c3f7e81bc8f (patch)
tree551fbfde9bd7ff98016cd47ed3fb55e128999182 /drivers/staging/media
parenta3703713e18a74103c2a0c2206ebc759fe068ca6 (diff)
Staging: media: davinci_vpfe: Drop macros
Drop macros instead use functions set_bit() and clear_bit directly. Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/media')
-rw-r--r--drivers/staging/media/davinci_vpfe/dm365_ipipeif.c18
-rw-r--r--drivers/staging/media/davinci_vpfe/dm365_ipipeif.h2
2 files changed, 9 insertions, 11 deletions
diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c
index 4380e0a8e6dc..51d4cd1bdb97 100644
--- a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c
+++ b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c
@@ -189,7 +189,7 @@ static int ipipeif_hw_setup(struct v4l2_subdev *sd)
enum ipipeif_input_source ipipeif_source;
u32 isif_port_if;
void __iomem *ipipeif_base_addr;
- unsigned int val;
+ unsigned long val;
int data_shift;
int pack_mode;
int source1;
@@ -296,14 +296,14 @@ static int ipipeif_hw_setup(struct v4l2_subdev *sd)
case MEDIA_BUS_FMT_YUYV8_1X16:
case MEDIA_BUS_FMT_UYVY8_2X8:
case MEDIA_BUS_FMT_Y8_1X8:
- RESETBIT(val, IPIPEIF_CFG2_YUV8_SHIFT);
- SETBIT(val, IPIPEIF_CFG2_YUV16_SHIFT);
+ clear_bit(IPIPEIF_CFG2_YUV8_SHIFT, &val);
+ set_bit(IPIPEIF_CFG2_YUV16_SHIFT, &val);
ipipeif_write(val, ipipeif_base_addr, IPIPEIF_CFG2);
break;
default:
- RESETBIT(val, IPIPEIF_CFG2_YUV8_SHIFT);
- RESETBIT(val, IPIPEIF_CFG2_YUV16_SHIFT);
+ clear_bit(IPIPEIF_CFG2_YUV8_SHIFT, &val);
+ clear_bit(IPIPEIF_CFG2_YUV16_SHIFT, &val);
ipipeif_write(val, ipipeif_base_addr, IPIPEIF_CFG2);
break;
}
@@ -344,16 +344,16 @@ static int ipipeif_hw_setup(struct v4l2_subdev *sd)
switch (isif_port_if) {
case MEDIA_BUS_FMT_YUYV8_1X16:
case MEDIA_BUS_FMT_YUYV10_1X20:
- RESETBIT(val, IPIPEIF_CFG2_YUV8_SHIFT);
- SETBIT(val, IPIPEIF_CFG2_YUV16_SHIFT);
+ clear_bit(IPIPEIF_CFG2_YUV8_SHIFT, &val);
+ set_bit(IPIPEIF_CFG2_YUV16_SHIFT, &val);
break;
case MEDIA_BUS_FMT_YUYV8_2X8:
case MEDIA_BUS_FMT_UYVY8_2X8:
case MEDIA_BUS_FMT_Y8_1X8:
case MEDIA_BUS_FMT_YUYV10_2X10:
- SETBIT(val, IPIPEIF_CFG2_YUV8_SHIFT);
- SETBIT(val, IPIPEIF_CFG2_YUV16_SHIFT);
+ set_bit(IPIPEIF_CFG2_YUV8_SHIFT, &val);
+ set_bit(IPIPEIF_CFG2_YUV16_SHIFT, &val);
val |= IPIPEIF_CBCR_Y << IPIPEIF_CFG2_YUV8P_SHIFT;
break;
diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.h b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.h
index 4685d64016de..4d126fc871f3 100644
--- a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.h
+++ b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.h
@@ -166,8 +166,6 @@ struct vpfe_ipipeif_device {
#define IPIPEIF_RSZ_MIN 16
#define IPIPEIF_RSZ_MAX 112
#define IPIPEIF_RSZ_CONST 16
-#define SETBIT(reg, bit) (reg = ((reg) | ((0x00000001)<<(bit))))
-#define RESETBIT(reg, bit) (reg = ((reg) & (~(0x00000001<<(bit)))))
#define IPIPEIF_ADOFS_LSB_MASK 0x1ff
#define IPIPEIF_ADOFS_LSB_SHIFT 5