diff options
author | Peter Senna Tschudin <peter.senna@gmail.com> | 2013-09-22 14:44:11 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-09-23 03:34:30 -0400 |
commit | 62a83183c477759363b2228e6b64c17593d9e4be (patch) | |
tree | b7941b3bb723db287d8f401a6b3df69feb102f8b /drivers/video/omap2 | |
parent | 24586d8342ab27bc75e4560d71e98f3e5dc67d8e (diff) |
OMAPDSS: DISPC: Fix assignment of 0/1 to bool variables
Convert 0 to false and 1 to true when assigning values to bool
variables. Inspired by commit 3db1cd5c05f35fb43eb134df6f321de4e63141f2.
The simplified semantic patch that find this problem is as
follows (http://coccinelle.lip6.fr/):
@@
bool b;
@@
(
-b = 0
+b = false
|
-b = 1
+b = true
)
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2')
-rw-r--r-- | drivers/video/omap2/dss/dispc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index 02a7340111df..8fbeb299fac3 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c | |||
@@ -2352,7 +2352,7 @@ int dispc_ovl_check(enum omap_plane plane, enum omap_channel channel, | |||
2352 | { | 2352 | { |
2353 | enum omap_overlay_caps caps = dss_feat_get_overlay_caps(plane); | 2353 | enum omap_overlay_caps caps = dss_feat_get_overlay_caps(plane); |
2354 | bool five_taps = true; | 2354 | bool five_taps = true; |
2355 | bool fieldmode = 0; | 2355 | bool fieldmode = false; |
2356 | u16 in_height = oi->height; | 2356 | u16 in_height = oi->height; |
2357 | u16 in_width = oi->width; | 2357 | u16 in_width = oi->width; |
2358 | bool ilace = timings->interlace; | 2358 | bool ilace = timings->interlace; |
@@ -2365,7 +2365,7 @@ int dispc_ovl_check(enum omap_plane plane, enum omap_channel channel, | |||
2365 | out_height = oi->out_height == 0 ? oi->height : oi->out_height; | 2365 | out_height = oi->out_height == 0 ? oi->height : oi->out_height; |
2366 | 2366 | ||
2367 | if (ilace && oi->height == out_height) | 2367 | if (ilace && oi->height == out_height) |
2368 | fieldmode = 1; | 2368 | fieldmode = true; |
2369 | 2369 | ||
2370 | if (ilace) { | 2370 | if (ilace) { |
2371 | if (fieldmode) | 2371 | if (fieldmode) |
@@ -2396,7 +2396,7 @@ static int dispc_ovl_setup_common(enum omap_plane plane, | |||
2396 | bool mem_to_mem) | 2396 | bool mem_to_mem) |
2397 | { | 2397 | { |
2398 | bool five_taps = true; | 2398 | bool five_taps = true; |
2399 | bool fieldmode = 0; | 2399 | bool fieldmode = false; |
2400 | int r, cconv = 0; | 2400 | int r, cconv = 0; |
2401 | unsigned offset0, offset1; | 2401 | unsigned offset0, offset1; |
2402 | s32 row_inc; | 2402 | s32 row_inc; |
@@ -2417,7 +2417,7 @@ static int dispc_ovl_setup_common(enum omap_plane plane, | |||
2417 | out_height = out_height == 0 ? height : out_height; | 2417 | out_height = out_height == 0 ? height : out_height; |
2418 | 2418 | ||
2419 | if (ilace && height == out_height) | 2419 | if (ilace && height == out_height) |
2420 | fieldmode = 1; | 2420 | fieldmode = true; |
2421 | 2421 | ||
2422 | if (ilace) { | 2422 | if (ilace) { |
2423 | if (fieldmode) | 2423 | if (fieldmode) |