aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/vc04_services
diff options
context:
space:
mode:
authorDominic Braun <inf.braun@fau.de>2018-12-14 13:05:06 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-17 14:47:44 +0100
commita610360370329cdf6ba2ec98940810629843d179 (patch)
treee0f6852687cc448c777e909ed0d2d37e07700ac5 /drivers/staging/vc04_services
parentstaging: vc04_services: Remove VCHIQ_SHARED_STATE_T typedef (diff)
downloadlinux-dev-a610360370329cdf6ba2ec98940810629843d179.tar.xz
linux-dev-a610360370329cdf6ba2ec98940810629843d179.zip
staging: vc04_services: Remove VCHIQ_SLOT_INFO_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')
-rw-r--r--drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c11
-rw-r--r--drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h10
2 files changed, 11 insertions, 10 deletions
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
index 3b66445b86d0..95b3bfcdc9ec 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
@@ -1138,13 +1138,13 @@ queue_message_sync(VCHIQ_STATE_T *state, struct vchiq_service *service,
}
static inline void
-claim_slot(VCHIQ_SLOT_INFO_T *slot)
+claim_slot(struct vchiq_slot_info *slot)
{
slot->use_count++;
}
static void
-release_slot(VCHIQ_STATE_T *state, VCHIQ_SLOT_INFO_T *slot_info,
+release_slot(VCHIQ_STATE_T *state, struct vchiq_slot_info *slot_info,
struct vchiq_header *header, struct vchiq_service *service)
{
int release_count;
@@ -2490,7 +2490,7 @@ release_service_messages(struct vchiq_service *service)
}
for (i = state->remote->slot_first; i <= slot_last; i++) {
- VCHIQ_SLOT_INFO_T *slot_info =
+ struct vchiq_slot_info *slot_info =
SLOT_INFO_FROM_INDEX(state, i);
if (slot_info->release_count != slot_info->use_count) {
char *data =
@@ -3233,7 +3233,7 @@ vchiq_release_message(VCHIQ_SERVICE_HANDLE_T handle,
int msgid = header->msgid;
if (msgid & VCHIQ_MSGID_CLAIMED) {
- VCHIQ_SLOT_INFO_T *slot_info =
+ struct vchiq_slot_info *slot_info =
SLOT_INFO_FROM_INDEX(state, slot_index);
release_slot(state, slot_info, header, service);
@@ -3389,7 +3389,8 @@ vchiq_dump_shared_state(void *dump_context, VCHIQ_STATE_T *state,
vchiq_dump(dump_context, buf, len + 1);
for (i = shared->slot_first; i <= shared->slot_last; i++) {
- VCHIQ_SLOT_INFO_T slot_info = *SLOT_INFO_FROM_INDEX(state, i);
+ struct vchiq_slot_info slot_info =
+ *SLOT_INFO_FROM_INDEX(state, i);
if (slot_info.use_count != slot_info.release_count) {
len = snprintf(buf, sizeof(buf),
" %d: %d/%d", i, slot_info.use_count,
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
index 95b1bd18809c..214939f6631e 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h
@@ -274,11 +274,11 @@ typedef struct vchiq_slot_struct {
char data[VCHIQ_SLOT_SIZE];
} VCHIQ_SLOT_T;
-typedef struct vchiq_slot_info_struct {
+struct vchiq_slot_info {
/* Use two counters rather than one to avoid the need for a mutex. */
short use_count;
short release_count;
-} VCHIQ_SLOT_INFO_T;
+};
struct vchiq_service {
struct vchiq_service_base base;
@@ -393,7 +393,7 @@ typedef struct vchiq_slot_zero_struct {
int platform_data[2];
struct vchiq_shared_state master;
struct vchiq_shared_state slave;
- VCHIQ_SLOT_INFO_T slots[VCHIQ_MAX_SLOTS];
+ struct vchiq_slot_info slots[VCHIQ_MAX_SLOTS];
} VCHIQ_SLOT_ZERO_T;
struct vchiq_state_struct {
@@ -439,7 +439,7 @@ struct vchiq_state_struct {
char *tx_data;
char *rx_data;
- VCHIQ_SLOT_INFO_T *rx_info;
+ struct vchiq_slot_info *rx_info;
struct mutex slot_mutex;
@@ -498,7 +498,7 @@ struct vchiq_state_struct {
struct vchiq_service *services[VCHIQ_MAX_SERVICES];
struct vchiq_service_quota service_quotas[VCHIQ_MAX_SERVICES];
- VCHIQ_SLOT_INFO_T slot_info[VCHIQ_MAX_SLOTS];
+ struct vchiq_slot_info slot_info[VCHIQ_MAX_SLOTS];
VCHIQ_PLATFORM_STATE_T platform_state;
};