summaryrefslogtreecommitdiffstats
path: root/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c
diff options
context:
space:
mode:
authorDominic Braun <inf.braun@fau.de>2018-12-14 13:04:57 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-17 14:46:22 +0100
commite8968525282f6c12355f9ee1375ab36cb0bc0cbd (patch)
treec621a1b744e7fdf6ce95f3f8ab925dacedb7c763 /drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c
parent3515279e6ed1304085e044804d4906adf47ce501 (diff)
staging: vc04_services: Remove VCHIQ_HEADER_T typedef
Typedefing structs is not encouraged in the kernel. Signed-off-by: Dominic Braun <inf.braun@fau.de> Signed-off-by: Tobias Büttner <tobias.buettner@fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c')
-rw-r--r--drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c
index 248a3170b42c..b087173a60f0 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c
@@ -50,7 +50,8 @@ int vchiu_queue_init(VCHIU_QUEUE_T *queue, int size)
init_completion(&queue->pop);
init_completion(&queue->push);
- queue->storage = kcalloc(size, sizeof(VCHIQ_HEADER_T *), GFP_KERNEL);
+ queue->storage = kcalloc(size, sizeof(struct vchiq_header *),
+ GFP_KERNEL);
if (!queue->storage) {
vchiu_queue_delete(queue);
return 0;
@@ -73,7 +74,7 @@ int vchiu_queue_is_full(VCHIU_QUEUE_T *queue)
return queue->write == queue->read + queue->size;
}
-void vchiu_queue_push(VCHIU_QUEUE_T *queue, VCHIQ_HEADER_T *header)
+void vchiu_queue_push(VCHIU_QUEUE_T *queue, struct vchiq_header *header)
{
if (!queue->initialized)
return;
@@ -89,7 +90,7 @@ void vchiu_queue_push(VCHIU_QUEUE_T *queue, VCHIQ_HEADER_T *header)
complete(&queue->push);
}
-VCHIQ_HEADER_T *vchiu_queue_peek(VCHIU_QUEUE_T *queue)
+struct vchiq_header *vchiu_queue_peek(VCHIU_QUEUE_T *queue)
{
while (queue->write == queue->read) {
if (wait_for_completion_killable(&queue->push))
@@ -101,9 +102,9 @@ VCHIQ_HEADER_T *vchiu_queue_peek(VCHIU_QUEUE_T *queue)
return queue->storage[queue->read & (queue->size - 1)];
}
-VCHIQ_HEADER_T *vchiu_queue_pop(VCHIU_QUEUE_T *queue)
+struct vchiq_header *vchiu_queue_pop(VCHIU_QUEUE_T *queue)
{
- VCHIQ_HEADER_T *header;
+ struct vchiq_header *header;
while (queue->write == queue->read) {
if (wait_for_completion_killable(&queue->push))