From 0743a78fde7cc561ad53b657be693e7f9981a73a Mon Sep 17 00:00:00 2001 From: Gargi Sharma Date: Mon, 20 Feb 2017 00:44:18 +0530 Subject: [PATCH] staging: media: Remove ternary operator Relational and logical operators evaluate to either true or false. Explicit conversion is not needed so remove the ternary operator. Done using coccinelle: @r@ expression A,B; symbol true,false; binary operator b = {==,!=,&&,||,>=,<=,>,<}; @@ - (A b B) ? true : false + A b B Signed-off-by: Gargi Sharma Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- drivers/staging/media/platform/bcm2835/controls.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/media/platform/bcm2835/controls.c b/drivers/staging/media/platform/bcm2835/controls.c index a40987b2e75d..4d7e2a2976c2 100644 --- a/drivers/staging/media/platform/bcm2835/controls.c +++ b/drivers/staging/media/platform/bcm2835/controls.c @@ -218,9 +218,7 @@ static int ctrl_set_iso(struct bm2835_mmal_dev *dev, dev->iso = iso_values[ctrl->val]; else if (ctrl->id == V4L2_CID_ISO_SENSITIVITY_AUTO) dev->manual_iso_enabled = - (ctrl->val == V4L2_ISO_SENSITIVITY_MANUAL ? - true : - false); + (ctrl->val == V4L2_ISO_SENSITIVITY_MANUAL); control = &dev->component[MMAL_COMPONENT_CAMERA]->control; -- 2.30.2