staging: mmal-vchiq: Avoid use of bool in structures
authorDave Stevenson <dave.stevenson@raspberrypi.org>
Mon, 29 Oct 2018 16:20:46 +0000 (16:20 +0000)
committerpopcornmix <popcornmix@gmail.com>
Mon, 13 May 2019 23:08:13 +0000 (00:08 +0100)
Fixes up a checkpatch error "Avoid using bool structure members
because of possible alignment issues".

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.h

index 365d5cc..4bc6b87 100644 (file)
@@ -860,9 +860,9 @@ static int port_info_get(struct vchiq_mmal_instance *instance,
                goto release_msg;
 
        if (rmsg->u.port_info_get_reply.port.is_enabled == 0)
-               port->enabled = false;
+               port->enabled = 0;
        else
-               port->enabled = true;
+               port->enabled = 1;
 
        /* copy the values out of the message */
        port->handle = rmsg->u.port_info_get_reply.port_handle;
@@ -1299,7 +1299,7 @@ static int port_disable(struct vchiq_mmal_instance *instance,
        if (!port->enabled)
                return 0;
 
-       port->enabled = false;
+       port->enabled = 0;
 
        ret = port_action_port(instance, port,
                               MMAL_MSG_PORT_ACTION_TYPE_DISABLE);
@@ -1351,7 +1351,7 @@ static int port_enable(struct vchiq_mmal_instance *instance,
        if (ret)
                goto done;
 
-       port->enabled = true;
+       port->enabled = 1;
 
        if (port->buffer_cb) {
                /* send buffer headers to videocore */
@@ -1523,7 +1523,7 @@ int vchiq_mmal_port_connect_tunnel(struct vchiq_mmal_instance *instance,
                        pr_err("failed disconnecting src port\n");
                        goto release_unlock;
                }
-               src->connected->enabled = false;
+               src->connected->enabled = 0;
                src->connected = NULL;
        }
 
@@ -1759,7 +1759,7 @@ int vchiq_mmal_component_enable(struct vchiq_mmal_instance *instance,
 
        ret = enable_component(instance, component);
        if (ret == 0)
-               component->enabled = true;
+               component->enabled = 1;
 
        mutex_unlock(&instance->vchiq_mutex);
 
@@ -1785,7 +1785,7 @@ int vchiq_mmal_component_disable(struct vchiq_mmal_instance *instance,
 
        ret = disable_component(instance, component);
        if (ret == 0)
-               component->enabled = false;
+               component->enabled = 0;
 
        mutex_unlock(&instance->vchiq_mutex);
 
index ffa4555..edc5d91 100644 (file)
@@ -48,7 +48,7 @@ typedef void (*vchiq_mmal_buffer_cb)(
                unsigned long length, u32 mmal_flags, s64 dts, s64 pts);
 
 struct vchiq_mmal_port {
-       bool enabled;
+       u32 enabled:1;
        u32 handle;
        u32 type; /* port type, cached to use on port info set */
        u32 index; /* port index, cached to use on port info set */
@@ -83,7 +83,7 @@ struct vchiq_mmal_port {
 
 struct vchiq_mmal_component {
        u32 in_use:1;
-       bool enabled;
+       u32 enabled:1;
        u32 handle;  /* VideoCore handle for component */
        u32 inputs;  /* Number of input ports */
        u32 outputs; /* Number of output ports */