[PATCH 05/10] staging: bcm2835-camera: Convert struct mmal_port info fields to u32

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The struct mmal_port has a few informational fields. Convert these to
u32.

Signed-off-by: Michael Zoran <mzoran@xxxxxxxxxxxx>
---
 drivers/staging/vc04_services/bcm2835-camera/mmal-msg-port.h | 10 +++++-----
 drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c    |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-msg-port.h b/drivers/staging/vc04_services/bcm2835-camera/mmal-msg-port.h
index a55c1ea2eceb..369d5d02c350 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/mmal-msg-port.h
+++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-msg-port.h
@@ -42,15 +42,15 @@ enum mmal_port_type {
  * buffer_num, buffer_size and userdata parameters are writable.
  */
 struct mmal_port {
-	void *priv; /* Private member used by the framework */
-	const char *name; /* Port name. Used for debugging purposes (RO) */
+	u32 priv; /* Private member used by the framework */
+	u32 name; /* Port name. Used for debugging purposes (RO) */
 
 	u32 type;      /* Type of the port (RO) enum mmal_port_type */
 	u16 index;     /* Index of the port in its type list (RO) */
 	u16 index_all; /* Index of the port in the list of all ports (RO) */
 
 	u32 is_enabled; /* Indicates whether the port is enabled or not (RO) */
-	struct mmal_es_format *format; /* Format of the elementary stream */
+	u32 format; /* Format of the elementary stream */
 
 	u32 buffer_num_min; /* Minimum number of buffers the port
 			     *   requires (RO).  This is set by the
@@ -94,9 +94,9 @@ struct mmal_port {
 			  * the client.
 			  */
 
-	void *component; /* Component this port belongs to (Read Only) */
+	u32 component; /* Component this port belongs to (Read Only) */
 
-	void *userdata; /* Field reserved for use by the client */
+	u32 userdata; /* Field reserved for use by the client */
 
 	u32 capabilities; /* Flags describing the capabilities of a
 			   * port (RO).  Bitwise combination of \ref
diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
index c28fab51db88..26a6f27b0aaf 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
@@ -943,7 +943,7 @@ static void port_to_mmal_msg(struct vchiq_mmal_port *port, struct mmal_port *p)
 	/* only three writable fields in a port */
 	p->buffer_num = port->current_buffer.num;
 	p->buffer_size = port->current_buffer.size;
-	p->userdata = port;
+	p->userdata = (u32)(unsigned long)port;
 }
 
 static int port_info_set(struct vchiq_mmal_instance *instance,
-- 
2.11.0

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux