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>
}
VCHIQ_STATUS_T
-vchiq_prepare_bulk_data(VCHIQ_BULK_T *bulk, void *offset, int size, int dir)
+vchiq_prepare_bulk_data(struct vchiq_bulk *bulk, void *offset, int size,
+ int dir)
{
struct vchiq_pagelist_info *pagelistinfo;
}
void
-vchiq_complete_bulk(VCHIQ_BULK_T *bulk)
+vchiq_complete_bulk(struct vchiq_bulk *bulk)
{
if (bulk && bulk->remote_data && bulk->actual)
free_pagelist((struct vchiq_pagelist_info *)bulk->remote_data,
mutex_unlock(&instance->bulk_waiter_list_mutex);
if (waiter) {
- VCHIQ_BULK_T *bulk = waiter->bulk_waiter.bulk;
+ struct vchiq_bulk *bulk = waiter->bulk_waiter.bulk;
if (bulk) {
/* This thread has an outstanding bulk transfer. */
VCHIQ_BULK_MODE_BLOCKING, dir);
if ((status != VCHIQ_RETRY) || fatal_signal_pending(current) ||
!waiter->bulk_waiter.bulk) {
- VCHIQ_BULK_T *bulk = waiter->bulk_waiter.bulk;
+ struct vchiq_bulk *bulk = waiter->bulk_waiter.bulk;
if (bulk) {
/* Cancel the signal when the transfer
if (status == VCHIQ_SUCCESS) {
while (queue->remove != queue->remote_notify) {
- VCHIQ_BULK_T *bulk =
+ struct vchiq_bulk *bulk =
&queue->bulks[BULK_INDEX(queue->remove)];
/* Only generate callbacks for non-dummy bulk
while ((queue->process != queue->local_insert) ||
(queue->process != queue->remote_insert)) {
- VCHIQ_BULK_T *bulk = &queue->bulks[BULK_INDEX(queue->process)];
+ struct vchiq_bulk *bulk =
+ &queue->bulks[BULK_INDEX(queue->process)];
if (queue->process == queue->remote_insert) {
/* fabricate a matching dummy bulk */
&& (service->srvstate !=
VCHIQ_SRVSTATE_FREE)) {
struct vchiq_bulk_queue *queue;
- VCHIQ_BULK_T *bulk;
+ struct vchiq_bulk *bulk;
queue = (type == VCHIQ_MSG_BULK_RX_DONE) ?
&service->bulk_rx : &service->bulk_tx;
{
VCHIQ_SERVICE_T *service = find_service_by_handle(handle);
struct vchiq_bulk_queue *queue;
- VCHIQ_BULK_T *bulk;
+ struct vchiq_bulk *bulk;
VCHIQ_STATE_T *state;
struct bulk_waiter *bulk_waiter = NULL;
const char dir_char = (dir == VCHIQ_BULK_TRANSMIT) ? 't' : 'r';
typedef void (*VCHIQ_USERDATA_TERM_T)(void *userdata);
-typedef struct vchiq_bulk_struct {
+struct vchiq_bulk {
short mode;
short dir;
void *userdata;
void *remote_data;
int remote_size;
int actual;
-} VCHIQ_BULK_T;
+};
struct vchiq_bulk_queue {
int local_insert; /* Where to insert the next local bulk */
int remote_notify; /* Bulk to notify the remote client of next (mstr) */
int remove; /* Bulk to notify the local client of, and remove,
** next */
- VCHIQ_BULK_T bulks[VCHIQ_NUM_SERVICE_BULKS];
+ struct vchiq_bulk bulks[VCHIQ_NUM_SERVICE_BULKS];
};
struct remote_event {
};
struct bulk_waiter {
- VCHIQ_BULK_T *bulk;
+ struct vchiq_bulk *bulk;
struct completion event;
int actual;
};
** implementations must be provided. */
extern VCHIQ_STATUS_T
-vchiq_prepare_bulk_data(VCHIQ_BULK_T *bulk, void *offset, int size, int dir);
+vchiq_prepare_bulk_data(struct vchiq_bulk *bulk, void *offset, int size,
+ int dir);
extern void
-vchiq_complete_bulk(VCHIQ_BULK_T *bulk);
+vchiq_complete_bulk(struct vchiq_bulk *bulk);
extern void
remote_event_signal(struct remote_event *event);