48cc89eec97f4402aae5d525ac03022b3c480ac6
[openwrt/staging/jow.git] /
1 From 504d899794febbec7f371a2ef3d1b18e991d18e5 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Mon, 29 Oct 2018 16:20:46 +0000
4 Subject: [PATCH 269/703] staging: mmal-vchiq: Avoid use of bool in structures
5
6 Fixes up a checkpatch error "Avoid using bool structure members
7 because of possible alignment issues".
8
9 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
10 ---
11 .../staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 14 +++++++-------
12 .../staging/vc04_services/vchiq-mmal/mmal-vchiq.h | 4 ++--
13 2 files changed, 9 insertions(+), 9 deletions(-)
14
15 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
16 +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
17 @@ -861,9 +861,9 @@ static int port_info_get(struct vchiq_mm
18 goto release_msg;
19
20 if (rmsg->u.port_info_get_reply.port.is_enabled == 0)
21 - port->enabled = false;
22 + port->enabled = 0;
23 else
24 - port->enabled = true;
25 + port->enabled = 1;
26
27 /* copy the values out of the message */
28 port->handle = rmsg->u.port_info_get_reply.port_handle;
29 @@ -1300,7 +1300,7 @@ static int port_disable(struct vchiq_mma
30 if (!port->enabled)
31 return 0;
32
33 - port->enabled = false;
34 + port->enabled = 0;
35
36 ret = port_action_port(instance, port,
37 MMAL_MSG_PORT_ACTION_TYPE_DISABLE);
38 @@ -1352,7 +1352,7 @@ static int port_enable(struct vchiq_mmal
39 if (ret)
40 goto done;
41
42 - port->enabled = true;
43 + port->enabled = 1;
44
45 if (port->buffer_cb) {
46 /* send buffer headers to videocore */
47 @@ -1524,7 +1524,7 @@ int vchiq_mmal_port_connect_tunnel(struc
48 pr_err("failed disconnecting src port\n");
49 goto release_unlock;
50 }
51 - src->connected->enabled = false;
52 + src->connected->enabled = 0;
53 src->connected = NULL;
54 }
55
56 @@ -1760,7 +1760,7 @@ int vchiq_mmal_component_enable(struct v
57
58 ret = enable_component(instance, component);
59 if (ret == 0)
60 - component->enabled = true;
61 + component->enabled = 1;
62
63 mutex_unlock(&instance->vchiq_mutex);
64
65 @@ -1786,7 +1786,7 @@ int vchiq_mmal_component_disable(struct
66
67 ret = disable_component(instance, component);
68 if (ret == 0)
69 - component->enabled = false;
70 + component->enabled = 0;
71
72 mutex_unlock(&instance->vchiq_mutex);
73
74 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.h
75 +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.h
76 @@ -48,7 +48,7 @@ typedef void (*vchiq_mmal_buffer_cb)(
77 unsigned long length, u32 mmal_flags, s64 dts, s64 pts);
78
79 struct vchiq_mmal_port {
80 - bool enabled;
81 + u32 enabled:1;
82 u32 handle;
83 u32 type; /* port type, cached to use on port info set */
84 u32 index; /* port index, cached to use on port info set */
85 @@ -83,7 +83,7 @@ struct vchiq_mmal_port {
86
87 struct vchiq_mmal_component {
88 u32 in_use:1;
89 - bool enabled;
90 + u32 enabled:1;
91 u32 handle; /* VideoCore handle for component */
92 u32 inputs; /* Number of input ports */
93 u32 outputs; /* Number of output ports */