From: Ken Cox Date: Wed, 5 Mar 2014 20:52:25 +0000 (-0600) Subject: staging: unisys: Give exported symbols unique names X-Git-Tag: v4.14-rc1~7811^2~703 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=927c7927eee73e195afc5b76ffb91bd72e3cb03d;p=platform%2Fkernel%2Flinux-rpi.git staging: unisys: Give exported symbols unique names Many exported symbols had very generic names. This commit changes the names so that they will be unique. Signed-off-by: Ken Cox Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/unisys/channels/channel.c b/drivers/staging/unisys/channels/channel.c index afe8cea..39ffe52 100644 --- a/drivers/staging/unisys/channels/channel.c +++ b/drivers/staging/unisys/channels/channel.c @@ -44,7 +44,7 @@ * 1 if the insertion succeeds, 0 if the queue was full. */ unsigned char -SignalInsert(pCHANNEL_HEADER pChannel, U32 Queue, void *pSignal) +visor_signal_insert(pCHANNEL_HEADER pChannel, U32 Queue, void *pSignal) { void *psignal; unsigned int head, tail; @@ -78,7 +78,7 @@ SignalInsert(pCHANNEL_HEADER pChannel, U32 Queue, void *pSignal) pqhdr->NumSignalsSent++; return 1; } -EXPORT_SYMBOL_GPL(SignalInsert); +EXPORT_SYMBOL_GPL(visor_signal_insert); /* * Routine Description: @@ -99,7 +99,7 @@ EXPORT_SYMBOL_GPL(SignalInsert); * 1 if the removal succeeds, 0 if the queue was empty. */ unsigned char -SignalRemove(pCHANNEL_HEADER pChannel, U32 Queue, void *pSignal) +visor_signal_remove(pCHANNEL_HEADER pChannel, U32 Queue, void *pSignal) { void *psource; unsigned int head, tail; @@ -131,7 +131,7 @@ SignalRemove(pCHANNEL_HEADER pChannel, U32 Queue, void *pSignal) pqhdr->NumSignalsReceived++; return 1; } -EXPORT_SYMBOL_GPL(SignalRemove); +EXPORT_SYMBOL_GPL(visor_signal_remove); /* * Routine Description: @@ -257,14 +257,14 @@ SignalPeek(pCHANNEL_HEADER pChannel, U32 Queue, U32 Position, void *pSignal) * 1 if the signal queue is empty, 0 otherwise. */ unsigned char -SignalQueueIsEmpty(pCHANNEL_HEADER pChannel, U32 Queue) +visor_signalqueue_empty(pCHANNEL_HEADER pChannel, U32 Queue) { pSIGNAL_QUEUE_HEADER pqhdr = (pSIGNAL_QUEUE_HEADER) ((char *) pChannel + pChannel->oChannelSpace) + Queue; return pqhdr->Head == pqhdr->Tail; } -EXPORT_SYMBOL_GPL(SignalQueueIsEmpty); +EXPORT_SYMBOL_GPL(visor_signalqueue_empty); /* * Routine Description: diff --git a/drivers/staging/unisys/channels/chanstub.c b/drivers/staging/unisys/channels/chanstub.c index 37e207d..92bb52c 100644 --- a/drivers/staging/unisys/channels/chanstub.c +++ b/drivers/staging/unisys/channels/chanstub.c @@ -45,7 +45,7 @@ SignalInsert_withLock(pCHANNEL_HEADER pChannel, U32 Queue, unsigned char result; unsigned long flags; spin_lock_irqsave(lock, flags); - result = SignalInsert(pChannel, Queue, pSignal); + result = visor_signal_insert(pChannel, Queue, pSignal); spin_unlock_irqrestore(lock, flags); return result; } @@ -56,7 +56,7 @@ SignalRemove_withLock(pCHANNEL_HEADER pChannel, U32 Queue, { unsigned char result; spin_lock(lock); - result = SignalRemove(pChannel, Queue, pSignal); + result = visor_signal_remove(pChannel, Queue, pSignal); spin_unlock(lock); return result; } diff --git a/drivers/staging/unisys/common-spar/include/channels/channel.h b/drivers/staging/unisys/common-spar/include/channels/channel.h index 83906b4..284ac68 100644 --- a/drivers/staging/unisys/common-spar/include/channels/channel.h +++ b/drivers/staging/unisys/common-spar/include/channels/channel.h @@ -283,7 +283,7 @@ typedef struct _SIGNAL_QUEUE_HEADER { U64 NumInterruptsReceived; /* Total # of Interrupts received. This * is incremented by the ISR in the * guest windows driver */ - U64 NumEmptyCnt; /* Number of times that SignalRemove + U64 NumEmptyCnt; /* Number of times that visor_signal_remove * is called and returned Empty * Status. */ U32 ErrorFlags; /* Error bits set during SignalReinit @@ -584,7 +584,8 @@ ULTRA_channel_client_release_os(void *pChannel, U8 *chanId, void *logCtx, * full. */ -unsigned char SignalInsert(pCHANNEL_HEADER pChannel, U32 Queue, void *pSignal); +unsigned char visor_signal_insert(pCHANNEL_HEADER pChannel, U32 Queue, + void *pSignal); /* * Routine Description: @@ -605,7 +606,8 @@ unsigned char SignalInsert(pCHANNEL_HEADER pChannel, U32 Queue, void *pSignal); * empty. */ -unsigned char SignalRemove(pCHANNEL_HEADER pChannel, U32 Queue, void *pSignal); +unsigned char visor_signal_remove(pCHANNEL_HEADER pChannel, U32 Queue, + void *pSignal); /* * Routine Description: @@ -640,6 +642,6 @@ unsigned int SignalRemoveAll(pCHANNEL_HEADER pChannel, U32 Queue, * Return value: * 1 if the signal queue is empty, 0 otherwise. */ -unsigned char SignalQueueIsEmpty(pCHANNEL_HEADER pChannel, U32 Queue); +unsigned char visor_signalqueue_empty(pCHANNEL_HEADER pChannel, U32 Queue); #endif diff --git a/drivers/staging/unisys/include/periodic_work.h b/drivers/staging/unisys/include/periodic_work.h index 6e725dfb..6c7190b 100644 --- a/drivers/staging/unisys/include/periodic_work.h +++ b/drivers/staging/unisys/include/periodic_work.h @@ -27,14 +27,14 @@ */ typedef struct PERIODIC_WORK_Tag PERIODIC_WORK; -PERIODIC_WORK *periodic_work_create(ulong jiffy_interval, - struct workqueue_struct *workqueue, - void (*workfunc)(void *), - void *workfuncarg, - const char *devnam); -void periodic_work_destroy(PERIODIC_WORK *periodic_work); -BOOL periodic_work_nextperiod(PERIODIC_WORK *periodic_work); -BOOL periodic_work_start(PERIODIC_WORK *periodic_work); -BOOL periodic_work_stop(PERIODIC_WORK *periodic_work); +PERIODIC_WORK *visor_periodic_work_create(ulong jiffy_interval, + struct workqueue_struct *workqueue, + void (*workfunc)(void *), + void *workfuncarg, + const char *devnam); +void visor_periodic_work_destroy(PERIODIC_WORK *periodic_work); +BOOL visor_periodic_work_nextperiod(PERIODIC_WORK *periodic_work); +BOOL visor_periodic_work_start(PERIODIC_WORK *periodic_work); +BOOL visor_periodic_work_stop(PERIODIC_WORK *periodic_work); #endif diff --git a/drivers/staging/unisys/include/procobjecttree.h b/drivers/staging/unisys/include/procobjecttree.h index d3b69f4..c81d112 100644 --- a/drivers/staging/unisys/include/procobjecttree.h +++ b/drivers/staging/unisys/include/procobjecttree.h @@ -35,14 +35,14 @@ typedef struct MYPROCOBJECT_Tag MYPROCOBJECT; typedef struct MYPROCTYPE_Tag MYPROCTYPE; -MYPROCOBJECT *proc_CreateObject(MYPROCTYPE *type, const char *name, - void *context); -void proc_DestroyObject(MYPROCOBJECT *obj); -MYPROCTYPE *proc_CreateType(struct proc_dir_entry *procRootDir, - const char **name, - const char **propertyNames, - void (*show_property)(struct seq_file *, - void *, int)); -void proc_DestroyType(MYPROCTYPE *type); +MYPROCOBJECT *visor_proc_CreateObject(MYPROCTYPE *type, const char *name, + void *context); +void visor_proc_DestroyObject(MYPROCOBJECT *obj); +MYPROCTYPE *visor_proc_CreateType(struct proc_dir_entry *procRootDir, + const char **name, + const char **propertyNames, + void (*show_property)(struct seq_file *, + void *, int)); +void visor_proc_DestroyType(MYPROCTYPE *type); #endif diff --git a/drivers/staging/unisys/include/timskmodutils.h b/drivers/staging/unisys/include/timskmodutils.h index ba5f5c07..ea0ec49 100644 --- a/drivers/staging/unisys/include/timskmodutils.h +++ b/drivers/staging/unisys/include/timskmodutils.h @@ -39,12 +39,12 @@ void myprintk(const char *myDrvName, const char *devname, * (not including the trailing '\0' byte) * @ingroup internal */ -int hexDumpToBuffer(char *dest, - int destSize, - char *prefix, - char *src, - int srcLen, - int bytesToDumpPerLine); +int visor_hexDumpToBuffer(char *dest, + int destSize, + char *prefix, + char *src, + int srcLen, + int bytesToDumpPerLine); /*--------------------------------* *--- GENERAL MESSAGEQ STUFF ---* @@ -91,7 +91,7 @@ char *cyclesToIterationSeconds(u64 cycles, u64 cyclesPerSecond, u64 iterations, char *buf, size_t bufsize); char *cyclesToSomethingsPerSecond(u64 cycles, u64 cyclesPerSecond, u64 somethings, char *buf, size_t bufsize); -struct seq_file *seq_file_new_buffer(void *buf, size_t buf_size); -void seq_file_done_buffer(struct seq_file *m); +struct seq_file *visor_seq_file_new_buffer(void *buf, size_t buf_size); +void visor_seq_file_done_buffer(struct seq_file *m); #endif diff --git a/drivers/staging/unisys/include/uisutils.h b/drivers/staging/unisys/include/uisutils.h index 9fee353..44e2be0 100644 --- a/drivers/staging/unisys/include/uisutils.h +++ b/drivers/staging/unisys/include/uisutils.h @@ -107,8 +107,8 @@ dbg_iounmap(void *addr, char *file, int line) #define PROC_READ_BUFFER_SIZE 131072 /* size of the buffer to allocate to * hold all of /proc/XXX/info */ -int util_add_proc_line_ex(int *total, char **buffer, int *buffer_remaining, - char *format, ...); +int uisutil_add_proc_line_ex(int *total, char **buffer, int *buffer_remaining, + char *format, ...); int uisctrl_register_req_handler(int type, void *fptr, ULTRA_VBUS_DEVICEINFO *chipset_DriverInfo); @@ -212,9 +212,11 @@ struct chaninfo { /* CopyFragsInfoFromSkb returns the number of entries added to frags array * Returns -1 on failure. */ -unsigned int util_copy_fragsinfo_from_skb(unsigned char *calling_ctx, - void *skb_in, unsigned int firstfraglen, - unsigned int frags_max, struct phys_info frags[]); +unsigned int uisutil_copy_fragsinfo_from_skb(unsigned char *calling_ctx, + void *skb_in, + unsigned int firstfraglen, + unsigned int frags_max, + struct phys_info frags[]); static inline unsigned int Issue_VMCALL_IO_CONTROLVM_ADDR(U64 *ControlAddress, U32 *ControlBytes) diff --git a/drivers/staging/unisys/uislib/uislib.c b/drivers/staging/unisys/uislib/uislib.c index a004c9d..d77df9a 100644 --- a/drivers/staging/unisys/uislib/uislib.c +++ b/drivers/staging/unisys/uislib/uislib.c @@ -1624,8 +1624,8 @@ chipset_proc_write(struct file *file, const char __user *buffer, #define PROCLINE(...) \ do { \ - if (util_add_proc_line_ex(&tot, buff, \ - buff_len, __VA_ARGS__) < 0) { \ + if (uisutil_add_proc_line_ex(&tot, buff, \ + buff_len, __VA_ARGS__) < 0) { \ goto err_done; \ } \ } while (0) diff --git a/drivers/staging/unisys/uislib/uisqueue.c b/drivers/staging/unisys/uislib/uisqueue.c index 67e413f7..19ce76a 100644 --- a/drivers/staging/unisys/uislib/uisqueue.c +++ b/drivers/staging/unisys/uislib/uisqueue.c @@ -98,8 +98,8 @@ do_locked_client_insert(struct uisqueue_info *queueinfo, acquired = 1; - queueWasEmpty = SignalQueueIsEmpty(queueinfo->chan, whichqueue); - if (!SignalInsert(queueinfo->chan, whichqueue, pSignal)) + queueWasEmpty = visor_signalqueue_empty(queueinfo->chan, whichqueue); + if (!visor_signal_insert(queueinfo->chan, whichqueue, pSignal)) RETINT(0); ULTRA_CHANNEL_CLIENT_RELEASE_OS(queueinfo->chan, channelId, NULL); acquired = 0; @@ -138,11 +138,11 @@ uisqueue_put_cmdrsp_with_lock_client(struct uisqueue_info *queueinfo, issueInterruptIfEmpty, interruptHandle, channelId)) { if (oktowait != OK_TO_WAIT) { - LOGERR("****FAILED SignalInsert failed; cannot wait; insert aborted\n"); + LOGERR("****FAILED visor_signal_insert failed; cannot wait; insert aborted\n"); return 0; /* failed to queue */ } /* try again */ - LOGERR("****FAILED SignalInsert failed; waiting to try again\n"); + LOGERR("****FAILED visor_signal_insert failed; waiting to try again\n"); set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(msecs_to_jiffies(10)); } @@ -156,7 +156,7 @@ int uisqueue_get_cmdrsp(struct uisqueue_info *queueinfo, void *cmdrsp, unsigned int whichqueue) { - if (!SignalRemove(queueinfo->chan, whichqueue, cmdrsp)) + if (!visor_signal_remove(queueinfo->chan, whichqueue, cmdrsp)) return 0; queueinfo->packets_received++; diff --git a/drivers/staging/unisys/uislib/uisutils.c b/drivers/staging/unisys/uislib/uisutils.c index 974f8bc..208b7ea 100644 --- a/drivers/staging/unisys/uislib/uisutils.c +++ b/drivers/staging/unisys/uislib/uisutils.c @@ -48,7 +48,7 @@ atomic_t UisUtils_Registered_Services = ATOMIC_INIT(0); /*****************************************************/ int -util_add_proc_line_ex(int *total, char **buffer, int *buffer_remaining, +uisutil_add_proc_line_ex(int *total, char **buffer, int *buffer_remaining, char *format, ...) { va_list args; @@ -69,7 +69,7 @@ util_add_proc_line_ex(int *total, char **buffer, int *buffer_remaining, *total += len; return len; } -EXPORT_SYMBOL_GPL(util_add_proc_line_ex); +EXPORT_SYMBOL_GPL(uisutil_add_proc_line_ex); int uisctrl_register_req_handler(int type, void *fptr, @@ -185,7 +185,7 @@ Away: EXPORT_SYMBOL_GPL(uisctrl_unregister_req_handler_ex); /* - * unsigned int util_copy_fragsinfo_from_skb(unsigned char *calling_ctx, + * unsigned int uisutil_copy_fragsinfo_from_skb(unsigned char *calling_ctx, * void *skb_in, * unsigned int firstfraglen, * unsigned int frags_max, @@ -203,9 +203,10 @@ EXPORT_SYMBOL_GPL(uisctrl_unregister_req_handler_ex); * entries filled in frags */ unsigned int -util_copy_fragsinfo_from_skb(unsigned char *calling_ctx, void *skb_in, - unsigned int firstfraglen, unsigned int frags_max, - struct phys_info frags[]) +uisutil_copy_fragsinfo_from_skb(unsigned char *calling_ctx, void *skb_in, + unsigned int firstfraglen, + unsigned int frags_max, + struct phys_info frags[]) { unsigned int count = 0, ii, size, offset = 0, numfrags; struct sk_buff *skb = skb_in; @@ -259,11 +260,12 @@ util_copy_fragsinfo_from_skb(unsigned char *calling_ctx, void *skb_in, for (skbinlist = skb_shinfo(skb)->frag_list; skbinlist; skbinlist = skbinlist->next) { - c = util_copy_fragsinfo_from_skb("recursive", skbinlist, - skbinlist->len - - skbinlist->data_len, - frags_max - count, - &frags[count]); + c = uisutil_copy_fragsinfo_from_skb("recursive", + skbinlist, + skbinlist->len - + skbinlist->data_len, + frags_max - count, + &frags[count]); if (c == -1) { LOGERR("**** FAILED recursive call failed\n"); return -1; @@ -273,7 +275,7 @@ util_copy_fragsinfo_from_skb(unsigned char *calling_ctx, void *skb_in, } return count; } -EXPORT_SYMBOL_GPL(util_copy_fragsinfo_from_skb); +EXPORT_SYMBOL_GPL(uisutil_copy_fragsinfo_from_skb); static LIST_HEAD(ReqHandlerInfo_list); /* list of ReqHandlerInfo_t */ static DEFINE_SPINLOCK(ReqHandlerInfo_list_lock); diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c index dd5fe75..c292293 100644 --- a/drivers/staging/unisys/virthba/virthba.c +++ b/drivers/staging/unisys/virthba/virthba.c @@ -439,7 +439,7 @@ virthba_ISR(int irq, void *dev_id) mask = ~ULTRA_CHANNEL_ENABLE_INTS; rc1 = uisqueue_InterlockedAnd(virthbainfo->flags_addr, mask); } - if (SignalQueueIsEmpty(pChannelHeader, IOCHAN_FROM_IOPART)) { + if (visor_signalqueue_empty(pChannelHeader, IOCHAN_FROM_IOPART)) { virthbainfo->interrupts_notme++; return IRQ_NONE; } @@ -1617,7 +1617,8 @@ virthba_serverdown_complete(struct work_struct *work) virthbainfo->serverdown = true; virthbainfo->serverchangingstate = false; /* Return the ServerDown response to Command */ - device_pause_response(virtpcidev->busNo, virtpcidev->deviceNo, 0); + visorchipset_device_pause_response(virtpcidev->busNo, + virtpcidev->deviceNo, 0); } /* As per VirtpciFunc returns 1 for success and 0 for failure */ diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c index 509c77b..2695649 100644 --- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c +++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c @@ -29,7 +29,7 @@ #define MYDRVNAME "visorchannel" struct VISORCHANNEL_Tag { - MEMREGION *memregion; /* from memregion_create() */ + MEMREGION *memregion; /* from visor_memregion_create() */ CHANNEL_HEADER chan_hdr; GUID guid; ulong size; @@ -67,24 +67,25 @@ visorchannel_create_guts(HOSTADDRESS physaddr, ulong channelBytes, /* prepare chan_hdr (abstraction to read/write channel memory) */ if (parent == NULL) p->memregion = - memregion_create(physaddr, sizeof(CHANNEL_HEADER)); + visor_memregion_create(physaddr, sizeof(CHANNEL_HEADER)); else p->memregion = - memregion_create_overlapped - (parent->memregion, off, sizeof(CHANNEL_HEADER)); + visor_memregion_create_overlapped(parent->memregion, + off, + sizeof(CHANNEL_HEADER)); if (p->memregion == NULL) - FAIL("memregion_create failed", 0); - if (memregion_read(p->memregion, 0, &p->chan_hdr, - sizeof(CHANNEL_HEADER)) < 0) - FAIL("memregion_read failed", 0); + FAIL("visor_memregion_create failed", 0); + if (visor_memregion_read(p->memregion, 0, &p->chan_hdr, + sizeof(CHANNEL_HEADER)) < 0) + FAIL("visor_memregion_read failed", 0); if (channelBytes == 0) /* we had better be a CLIENT of this channel */ channelBytes = (ulong) p->chan_hdr.Size; if (STRUCTSEQUAL(guid, Guid0)) /* we had better be a CLIENT of this channel */ guid = p->chan_hdr.Type; - if (memregion_resize(p->memregion, channelBytes) < 0) - FAIL("memregion_resize failed", 0); + if (visor_memregion_resize(p->memregion, channelBytes) < 0) + FAIL("visor_memregion_resize failed", 0); p->size = channelBytes; p->guid = guid; @@ -143,7 +144,7 @@ visorchannel_destroy(VISORCHANNEL *channel) if (channel == NULL) return; if (channel->memregion != NULL) { - memregion_destroy(channel->memregion); + visor_memregion_destroy(channel->memregion); channel->memregion = NULL; } kfree(channel); @@ -153,7 +154,7 @@ EXPORT_SYMBOL_GPL(visorchannel_destroy); HOSTADDRESS visorchannel_get_physaddr(VISORCHANNEL *channel) { - return memregion_get_physaddr(channel->memregion); + return visor_memregion_get_physaddr(channel->memregion); } EXPORT_SYMBOL_GPL(visorchannel_get_physaddr); @@ -228,7 +229,8 @@ int visorchannel_read(VISORCHANNEL *channel, ulong offset, void *local, ulong nbytes) { - int rc = memregion_read(channel->memregion, offset, local, nbytes); + int rc = visor_memregion_read(channel->memregion, offset, + local, nbytes); if ((rc >= 0) && (offset == 0) && (nbytes >= sizeof(CHANNEL_HEADER))) memcpy(&channel->chan_hdr, local, sizeof(CHANNEL_HEADER)); return rc; @@ -241,7 +243,7 @@ visorchannel_write(VISORCHANNEL *channel, ulong offset, { if (offset == 0 && nbytes >= sizeof(CHANNEL_HEADER)) memcpy(&channel->chan_hdr, local, sizeof(CHANNEL_HEADER)); - return memregion_write(channel->memregion, offset, local, nbytes); + return visor_memregion_write(channel->memregion, offset, local, nbytes); } EXPORT_SYMBOL_GPL(visorchannel_write); @@ -263,8 +265,8 @@ visorchannel_clear(VISORCHANNEL *channel, ulong offset, U8 ch, ulong nbytes) int x = -1; if (nbytes < thisbytes) thisbytes = nbytes; - x = memregion_write(channel->memregion, offset + written, - buf, thisbytes); + x = visor_memregion_write(channel->memregion, offset + written, + buf, thisbytes); if (x < 0) RETINT(x); written += thisbytes; @@ -304,12 +306,12 @@ EXPORT_SYMBOL_GPL(visorchannel_get_header); /** Write the contents of a specific field within a SIGNAL_QUEUE_HEADER back * into host memory */ -#define SIG_WRITE_FIELD(channel, queue, sig_hdr, FIELD) \ - (memregion_write(channel->memregion, \ - SIG_QUEUE_OFFSET(&channel->chan_hdr, queue)+\ - offsetof(SIGNAL_QUEUE_HEADER, FIELD), \ - &((sig_hdr)->FIELD), \ - sizeof((sig_hdr)->FIELD)) >= 0) +#define SIG_WRITE_FIELD(channel, queue, sig_hdr, FIELD) \ + (visor_memregion_write(channel->memregion, \ + SIG_QUEUE_OFFSET(&channel->chan_hdr, queue)+ \ + offsetof(SIGNAL_QUEUE_HEADER, FIELD), \ + &((sig_hdr)->FIELD), \ + sizeof((sig_hdr)->FIELD)) >= 0) static BOOL sig_read_header(VISORCHANNEL *channel, U32 queue, @@ -322,12 +324,12 @@ sig_read_header(VISORCHANNEL *channel, U32 queue, /* Read the appropriate SIGNAL_QUEUE_HEADER into local memory. */ - if (memregion_read(channel->memregion, - SIG_QUEUE_OFFSET(&channel->chan_hdr, queue), - sig_hdr, sizeof(SIGNAL_QUEUE_HEADER)) < 0) { + if (visor_memregion_read(channel->memregion, + SIG_QUEUE_OFFSET(&channel->chan_hdr, queue), + sig_hdr, sizeof(SIGNAL_QUEUE_HEADER)) < 0) { ERRDRV("queue=%d SIG_QUEUE_OFFSET=%d", queue, (int)SIG_QUEUE_OFFSET(&channel->chan_hdr, queue)); - FAIL("memregion_read of signal queue failed", FALSE); + FAIL("visor_memregion_read of signal queue failed", FALSE); } RETBOOL(TRUE); Away: @@ -342,13 +344,16 @@ sig_do_data(VISORCHANNEL *channel, U32 queue, int signal_data_offset = SIG_DATA_OFFSET(&channel->chan_hdr, queue, sig_hdr, slot); if (is_write) { - if (memregion_write(channel->memregion, signal_data_offset, - data, sig_hdr->SignalSize) < 0) - FAIL("memregion_write of signal data failed", FALSE); + if (visor_memregion_write(channel->memregion, + signal_data_offset, + data, sig_hdr->SignalSize) < 0) + FAIL("visor_memregion_write of signal data failed", + FALSE); } else { - if (memregion_read(channel->memregion, signal_data_offset, - data, sig_hdr->SignalSize) < 0) - FAIL("memregion_read of signal data failed", FALSE); + if (visor_memregion_read(channel->memregion, signal_data_offset, + data, sig_hdr->SignalSize) < 0) + FAIL("visor_memregion_read of signal data failed", + FALSE); } RETBOOL(TRUE); Away: @@ -414,9 +419,10 @@ visorchannel_signalremove(VISORCHANNEL *channel, U32 queue, void *msg) */ MEMORYBARRIER; if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, Tail)) - FAIL("memregion_write of Tail failed", FALSE); + FAIL("visor_memregion_write of Tail failed", FALSE); if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, NumSignalsReceived)) - FAIL("memregion_write of NumSignalsReceived failed", FALSE); + FAIL("visor_memregion_write of NumSignalsReceived failed", + FALSE); RETBOOL(TRUE); @@ -468,9 +474,10 @@ visorchannel_safesignalremove(VISORCHANNEL *channel, U32 queue, void *msg) */ MEMORYBARRIER; if (!SIG_WRITE_FIELD(channel, queue, &unsafe_sqh, Tail)) - FAIL("memregion_write of Tail failed", FALSE); + FAIL("visor_memregion_write of Tail failed", FALSE); if (!SIG_WRITE_FIELD(channel, queue, &unsafe_sqh, NumSignalsReceived)) - FAIL("memregion_write of NumSignalsReceived failed", FALSE); + FAIL("visor_memregion_write of NumSignalsReceived failed", + FALSE); RETBOOL(TRUE); @@ -501,7 +508,8 @@ visorchannel_signalinsert(VISORCHANNEL *channel, U32 queue, void *msg) #endif sig_hdr.NumOverflows++; if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, NumOverflows)) - FAIL("memregion_write of NumOverflows failed", FALSE); + FAIL("visor_memregion_write of NumOverflows failed", + FALSE); RETBOOL(FALSE); } @@ -514,9 +522,9 @@ visorchannel_signalinsert(VISORCHANNEL *channel, U32 queue, void *msg) */ MEMORYBARRIER; if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, Head)) - FAIL("memregion_write of Head failed", FALSE); + FAIL("visor_memregion_write of Head failed", FALSE); if (!SIG_WRITE_FIELD(channel, queue, &sig_hdr, NumSignalsSent)) - FAIL("memregion_write of NumSignalsSent failed", FALSE); + FAIL("visor_memregion_write of NumSignalsSent failed", FALSE); RETBOOL(TRUE); @@ -595,7 +603,8 @@ visorchannel_safesignalinsert(VISORCHANNEL *channel, U32 queue, void *msg) #endif unsafe_sqh.NumOverflows++; if (!SIG_WRITE_FIELD(channel, queue, &unsafe_sqh, NumOverflows)) - FAIL("memregion_write of NumOverflows failed", FALSE); + FAIL("visor_memregion_write of NumOverflows failed", + FALSE); RETBOOL(FALSE); } @@ -608,9 +617,9 @@ visorchannel_safesignalinsert(VISORCHANNEL *channel, U32 queue, void *msg) */ MEMORYBARRIER; if (!SIG_WRITE_FIELD(channel, queue, &unsafe_sqh, Head)) - FAIL("memregion_write of Head failed", FALSE); + FAIL("visor_memregion_write of Head failed", FALSE); if (!SIG_WRITE_FIELD(channel, queue, &unsafe_sqh, NumSignalsSent)) - FAIL("memregion_write of NumSignalsSent failed", FALSE); + FAIL("visor_memregion_write of NumSignalsSent failed", FALSE); RETBOOL(TRUE); @@ -667,8 +676,8 @@ visorchannel_debug(VISORCHANNEL *channel, int nQueues, ERRDRV("%s no memregion", __func__); return; } - addr = memregion_get_physaddr(memregion); - nbytes_region = memregion_get_nbytes(memregion); + addr = visor_memregion_get_physaddr(memregion); + nbytes_region = visor_memregion_get_nbytes(memregion); errcode = visorchannel_read(channel, off, phdr, sizeof(CHANNEL_HEADER)); if (errcode < 0) { @@ -748,7 +757,7 @@ visorchannel_dump_section(VISORCHANNEL *chan, char *s, goto Away; } seq_printf(seq, "channel %s:\n", s); - hexDumpToBuffer(fmtbuf, fmtbufsize, " ", buf, len, 16); + visor_hexDumpToBuffer(fmtbuf, fmtbufsize, " ", buf, len, 16); for (i = 0; fmtbuf[i] != '\0'; i++) seq_printf(seq, "%c", fmtbuf[i]); diff --git a/drivers/staging/unisys/visorchipset/parser.c b/drivers/staging/unisys/visorchipset/parser.c index 09b3a84..f52c407 100644 --- a/drivers/staging/unisys/visorchipset/parser.c +++ b/drivers/staging/unisys/visorchipset/parser.c @@ -90,10 +90,10 @@ parser_init_guts(U64 addr, U32 bytes, BOOL isLocal, p = __va((ulong) (addr)); memcpy(ctx->data, p, bytes); } else { - rgn = memregion_create(addr, bytes); + rgn = visor_memregion_create(addr, bytes); if (!rgn) RETPTR(NULL); - if (memregion_read(rgn, 0, ctx->data, bytes) < 0) + if (visor_memregion_read(rgn, 0, ctx->data, bytes) < 0) RETPTR(NULL); } if (!hasStandardPayloadHeader) { @@ -126,7 +126,7 @@ parser_init_guts(U64 addr, U32 bytes, BOOL isLocal, Away: if (rgn) { - memregion_destroy(rgn); + visor_memregion_destroy(rgn); rgn = NULL; } if (rc) diff --git a/drivers/staging/unisys/visorchipset/visorchipset.h b/drivers/staging/unisys/visorchipset/visorchipset.h index 8e62a89..d4bf203 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset.h +++ b/drivers/staging/unisys/visorchipset/visorchipset.h @@ -268,7 +268,7 @@ visorchipset_register_busdev_server(VISORCHIPSET_BUSDEV_NOTIFIERS *notifiers, typedef void (*SPARREPORTEVENT_COMPLETE_FUNC) (CONTROLVM_MESSAGE *msg, int status); -void device_pause_response(ulong busNo, ulong devNo, int response); +void visorchipset_device_pause_response(ulong busNo, ulong devNo, int response); BOOL visorchipset_get_bus_info(ulong busNo, VISORCHIPSET_BUS_INFO *busInfo); BOOL visorchipset_get_device_info(ulong busNo, ulong devNo, diff --git a/drivers/staging/unisys/visorchipset/visorchipset_main.c b/drivers/staging/unisys/visorchipset/visorchipset_main.c index e0ec3a4..400cb03 100644 --- a/drivers/staging/unisys/visorchipset/visorchipset_main.c +++ b/drivers/staging/unisys/visorchipset/visorchipset_main.c @@ -354,7 +354,7 @@ static VISORCHIPSET_BUSDEV_RESPONDERS BusDev_Responders = { .bus_destroy = bus_destroy_response, .device_create = device_create_response, .device_destroy = device_destroy_response, - .device_pause = device_pause_response, + .device_pause = visorchipset_device_pause_response, .device_resume = device_resume_response, }; @@ -514,7 +514,7 @@ busInfo_clear(void *v) VISORCHIPSET_BUS_INFO *p = (VISORCHIPSET_BUS_INFO *) (v); if (p->procObject) { - proc_DestroyObject(p->procObject); + visor_proc_DestroyObject(p->procObject); p->procObject = NULL; } kfree(p->name); @@ -1184,7 +1184,7 @@ bus_configure(CONTROLVM_MESSAGE *inmsg, PARSER_CONTEXT *parser_ctx) visorchannel_GUID_id(&pBusInfo->partitionGuid, s); pBusInfo->procObject = - proc_CreateObject(PartitionType, s, (void *) (pBusInfo)); + visor_proc_CreateObject(PartitionType, s, (void *) (pBusInfo)); if (pBusInfo->procObject == NULL) { LOGERR("CONTROLVM_BUS_CONFIGURE Failed: busNo=%lu failed to create /proc entry", busNo); @@ -2225,14 +2225,14 @@ device_destroy_response(ulong busNo, ulong devNo, int response) } void -device_pause_response(ulong busNo, ulong devNo, int response) +visorchipset_device_pause_response(ulong busNo, ulong devNo, int response) { device_changestate_responder(CONTROLVM_DEVICE_CHANGESTATE, busNo, devNo, response, SegmentStateStandby); } -EXPORT_SYMBOL_GPL(device_pause_response); +EXPORT_SYMBOL_GPL(visorchipset_device_pause_response); static void device_resume_response(ulong busNo, ulong devNo, int response) @@ -2705,15 +2705,16 @@ visorchipset_init(void) InitPartitionProperties(); InitControlVmProperties(); - PartitionType = proc_CreateType(ProcDir, PartitionTypeNames, - (const char **) PartitionPropertyNames, - &show_partition_property); + PartitionType = visor_proc_CreateType(ProcDir, PartitionTypeNames, + (const char **) + PartitionPropertyNames, + &show_partition_property); ControlVmType = - proc_CreateType(ProcDir, ControlVmTypeNames, - (const char **) ControlVmPropertyNames, - &show_controlvm_property); + visor_proc_CreateType(ProcDir, ControlVmTypeNames, + (const char **) ControlVmPropertyNames, + &show_controlvm_property); - ControlVmObject = proc_CreateObject(ControlVmType, NULL, NULL); + ControlVmObject = visor_proc_CreateObject(ControlVmType, NULL, NULL); /* Setup Installation fields */ installer_file = proc_create("installer", 0644, ProcDir, @@ -2813,17 +2814,17 @@ visorchipset_exit(void) } filexfer_destructor(); if (ControlVmObject) { - proc_DestroyObject(ControlVmObject); + visor_proc_DestroyObject(ControlVmObject); ControlVmObject = NULL; } cleanup_controlvm_structures(); if (ControlVmType) { - proc_DestroyType(ControlVmType); + visor_proc_DestroyType(ControlVmType); ControlVmType = NULL; } if (PartitionType) { - proc_DestroyType(PartitionType); + visor_proc_DestroyType(PartitionType); PartitionType = NULL; } if (diag_proc_dir) { diff --git a/drivers/staging/unisys/visorutil/charqueue.c b/drivers/staging/unisys/visorutil/charqueue.c index 2bce94e..c1375ed 100644 --- a/drivers/staging/unisys/visorutil/charqueue.c +++ b/drivers/staging/unisys/visorutil/charqueue.c @@ -37,12 +37,12 @@ struct CHARQUEUE_Tag { -CHARQUEUE *charqueue_create(ulong nslots) +CHARQUEUE *visor_charqueue_create(ulong nslots) { int alloc_size = sizeof(CHARQUEUE) + nslots + 1; CHARQUEUE *cq = kmalloc(alloc_size, GFP_KERNEL|__GFP_NORETRY); if (cq == NULL) { - ERRDRV("charqueue_create allocation failed (alloc_size=%d)", + ERRDRV("visor_charqueue_create allocation failed (alloc_size=%d)", alloc_size); return NULL; } @@ -52,11 +52,11 @@ CHARQUEUE *charqueue_create(ulong nslots) spin_lock_init(&cq->lock); return cq; } -EXPORT_SYMBOL_GPL(charqueue_create); +EXPORT_SYMBOL_GPL(visor_charqueue_create); -void charqueue_enqueue(CHARQUEUE *charqueue, unsigned char c) +void visor_charqueue_enqueue(CHARQUEUE *charqueue, unsigned char c) { int alloc_slots = charqueue->nslots+1; /* 1 slot is always empty */ @@ -68,11 +68,11 @@ void charqueue_enqueue(CHARQUEUE *charqueue, unsigned char c) charqueue->buf[charqueue->head] = c; spin_unlock(&charqueue->lock); } -EXPORT_SYMBOL_GPL(charqueue_enqueue); +EXPORT_SYMBOL_GPL(visor_charqueue_enqueue); -BOOL charqueue_is_empty(CHARQUEUE *charqueue) +BOOL visor_charqueue_is_empty(CHARQUEUE *charqueue) { BOOL b; spin_lock(&charqueue->lock); @@ -80,7 +80,7 @@ BOOL charqueue_is_empty(CHARQUEUE *charqueue) spin_unlock(&charqueue->lock); return b; } -EXPORT_SYMBOL_GPL(charqueue_is_empty); +EXPORT_SYMBOL_GPL(visor_charqueue_is_empty); @@ -109,7 +109,7 @@ Away: -int charqueue_dequeue_n(CHARQUEUE *charqueue, unsigned char *buf, int n) +int visor_charqueue_dequeue_n(CHARQUEUE *charqueue, unsigned char *buf, int n) { int rc = -1, counter = 0, c; @@ -131,14 +131,14 @@ Away: spin_unlock(&charqueue->lock); return rc; } -EXPORT_SYMBOL_GPL(charqueue_dequeue_n); +EXPORT_SYMBOL_GPL(visor_charqueue_dequeue_n); -void charqueue_destroy(CHARQUEUE *charqueue) +void visor_charqueue_destroy(CHARQUEUE *charqueue) { if (charqueue == NULL) return; kfree(charqueue); } -EXPORT_SYMBOL_GPL(charqueue_destroy); +EXPORT_SYMBOL_GPL(visor_charqueue_destroy); diff --git a/drivers/staging/unisys/visorutil/charqueue.h b/drivers/staging/unisys/visorutil/charqueue.h index e9ce0a9..e82ae0bc 100644 --- a/drivers/staging/unisys/visorutil/charqueue.h +++ b/drivers/staging/unisys/visorutil/charqueue.h @@ -26,12 +26,12 @@ */ typedef struct CHARQUEUE_Tag CHARQUEUE; -CHARQUEUE *charqueue_create(ulong nslots); -void charqueue_enqueue(CHARQUEUE *charqueue, unsigned char c); +CHARQUEUE *visor_charqueue_create(ulong nslots); +void visor_charqueue_enqueue(CHARQUEUE *charqueue, unsigned char c); int charqueue_dequeue(CHARQUEUE *charqueue); -int charqueue_dequeue_n(CHARQUEUE *charqueue, unsigned char *buf, int n); -BOOL charqueue_is_empty(CHARQUEUE *charqueue); -void charqueue_destroy(CHARQUEUE *charqueue); +int visor_charqueue_dequeue_n(CHARQUEUE *charqueue, unsigned char *buf, int n); +BOOL visor_charqueue_is_empty(CHARQUEUE *charqueue); +void visor_charqueue_destroy(CHARQUEUE *charqueue); #endif diff --git a/drivers/staging/unisys/visorutil/easyproc.c b/drivers/staging/unisys/visorutil/easyproc.c index 2b750ee..60b6b83 100644 --- a/drivers/staging/unisys/visorutil/easyproc.c +++ b/drivers/staging/unisys/visorutil/easyproc.c @@ -20,14 +20,14 @@ * does it know anything about what information to reveal as part of the proc * entries. The 2 functions that take care of displaying device and * driver specific information are passed as parameters to - * easyproc_InitDriver(). + * visor_easyproc_InitDriver(). * * void show_device_info(struct seq_file *seq, void *p); * void show_driver_info(struct seq_file *seq); * * The second parameter to show_device_info is actually a pointer to the * device-specific info to show. It is the context that was originally - * passed to easyproc_InitDevice(). + * passed to visor_easyproc_InitDevice(). * ****************************************************************************** */ @@ -105,10 +105,11 @@ static const struct file_operations proc_fops_device_property = { -void easyproc_InitDriver(struct easyproc_driver_info *pdriver, - char *procId, - void (*show_driver_info)(struct seq_file *), - void (*show_device_info)(struct seq_file *, void *)) +void visor_easyproc_InitDriver(struct easyproc_driver_info *pdriver, + char *procId, + void (*show_driver_info)(struct seq_file *), + void (*show_device_info)(struct seq_file *, + void *)) { memset(pdriver, 0, sizeof(struct easyproc_driver_info)); pdriver->ProcId = procId; @@ -135,29 +136,33 @@ void easyproc_InitDriver(struct easyproc_driver_info *pdriver, pdriver->ProcId); } } -EXPORT_SYMBOL_GPL(easyproc_InitDriver); - - - -void easyproc_InitDriverEx(struct easyproc_driver_info *pdriver, - char *procId, - void (*show_driver_info)(struct seq_file *), - void (*show_device_info)(struct seq_file *, void *), - void (*write_driver_info)(char *buf, size_t count, - loff_t *ppos), - void (*write_device_info)(char *buf, size_t count, - loff_t *ppos, void *p)) +EXPORT_SYMBOL_GPL(visor_easyproc_InitDriver); + + + +void visor_easyproc_InitDriverEx(struct easyproc_driver_info *pdriver, + char *procId, + void (*show_driver_info)(struct seq_file *), + void (*show_device_info)(struct seq_file *, + void *), + void (*write_driver_info)(char *buf, + size_t count, + loff_t *ppos), + void (*write_device_info)(char *buf, + size_t count, + loff_t *ppos, + void *p)) { - easyproc_InitDriver(pdriver, procId, - show_driver_info, show_device_info); + visor_easyproc_InitDriver(pdriver, procId, + show_driver_info, show_device_info); pdriver->Write_driver_info = write_driver_info; pdriver->Write_device_info = write_device_info; } -EXPORT_SYMBOL_GPL(easyproc_InitDriverEx); +EXPORT_SYMBOL_GPL(visor_easyproc_InitDriverEx); -void easyproc_DeInitDriver(struct easyproc_driver_info *pdriver) +void visor_easyproc_DeInitDriver(struct easyproc_driver_info *pdriver) { if (pdriver->ProcDriverDiagFile != NULL) { remove_proc_entry("diag", pdriver->ProcDriverDir); @@ -181,13 +186,13 @@ void easyproc_DeInitDriver(struct easyproc_driver_info *pdriver) pdriver->Write_driver_info = NULL; pdriver->Write_device_info = NULL; } -EXPORT_SYMBOL_GPL(easyproc_DeInitDriver); +EXPORT_SYMBOL_GPL(visor_easyproc_DeInitDriver); -void easyproc_InitDevice(struct easyproc_driver_info *pdriver, - struct easyproc_device_info *p, int devno, - void *devdata) +void visor_easyproc_InitDevice(struct easyproc_driver_info *pdriver, + struct easyproc_device_info *p, int devno, + void *devdata) { if ((pdriver->ProcDeviceDir != NULL) && (p->procDevicexDir == NULL)) { char s[29]; @@ -210,13 +215,14 @@ void easyproc_InitDevice(struct easyproc_driver_info *pdriver, memset(&(p->device_property_info[0]), 0, sizeof(p->device_property_info)); } -EXPORT_SYMBOL_GPL(easyproc_InitDevice); +EXPORT_SYMBOL_GPL(visor_easyproc_InitDevice); -void easyproc_CreateDeviceProperty(struct easyproc_device_info *p, - void (*show_property_info)(struct seq_file *, void *), - char *property_name) +void visor_easyproc_CreateDeviceProperty(struct easyproc_device_info *p, + void (*show_property_info) + (struct seq_file *, void *), + char *property_name) { size_t i; struct easyproc_device_property_info *px = NULL; @@ -253,12 +259,12 @@ void easyproc_CreateDeviceProperty(struct easyproc_device_info *p, } px->show_device_property_info = show_property_info; } -EXPORT_SYMBOL_GPL(easyproc_CreateDeviceProperty); +EXPORT_SYMBOL_GPL(visor_easyproc_CreateDeviceProperty); -void easyproc_DeInitDevice(struct easyproc_driver_info *pdriver, - struct easyproc_device_info *p, int devno) +void visor_easyproc_DeInitDevice(struct easyproc_driver_info *pdriver, + struct easyproc_device_info *p, int devno) { size_t i; for (i = 0; i < ARRAY_SIZE(p->device_property_info); i++) { @@ -282,7 +288,7 @@ void easyproc_DeInitDevice(struct easyproc_driver_info *pdriver, p->devdata = NULL; p->pdriver = NULL; } -EXPORT_SYMBOL_GPL(easyproc_DeInitDevice); +EXPORT_SYMBOL_GPL(visor_easyproc_DeInitDevice); diff --git a/drivers/staging/unisys/visorutil/easyproc.h b/drivers/staging/unisys/visorutil/easyproc.h index a1b4df7..1cef1fd 100644 --- a/drivers/staging/unisys/visorutil/easyproc.h +++ b/drivers/staging/unisys/visorutil/easyproc.h @@ -61,26 +61,32 @@ struct easyproc_device_info { struct easyproc_device_property_info device_property_info[10]; }; -void easyproc_InitDevice(struct easyproc_driver_info *pdriver, - struct easyproc_device_info *p, int devno, - void *devdata); -void easyproc_DeInitDevice(struct easyproc_driver_info *pdriver, - struct easyproc_device_info *p, int devno); -void easyproc_InitDriver(struct easyproc_driver_info *pdriver, - char *procId, - void (*show_driver_info)(struct seq_file *), - void (*show_device_info)(struct seq_file *, void *)); -void easyproc_InitDriverEx(struct easyproc_driver_info *pdriver, - char *procId, - void (*show_driver_info)(struct seq_file *), - void (*show_device_info)(struct seq_file *, void *), - void (*Write_driver_info)(char *buf, size_t count, - loff_t *ppos), - void (*Write_device_info)(char *buf, size_t count, - loff_t *ppos, void *p)); -void easyproc_DeInitDriver(struct easyproc_driver_info *pdriver); -void easyproc_CreateDeviceProperty(struct easyproc_device_info *p, - void (*show_property_info)(struct seq_file *, void *), - char *property_name); +void visor_easyproc_InitDevice(struct easyproc_driver_info *pdriver, + struct easyproc_device_info *p, int devno, + void *devdata); +void visor_easyproc_DeInitDevice(struct easyproc_driver_info *pdriver, + struct easyproc_device_info *p, int devno); +void visor_easyproc_InitDriver(struct easyproc_driver_info *pdriver, + char *procId, + void (*show_driver_info)(struct seq_file *), + void (*show_device_info)(struct seq_file *, + void *)); +void visor_easyproc_InitDriverEx(struct easyproc_driver_info *pdriver, + char *procId, + void (*show_driver_info)(struct seq_file *), + void (*show_device_info)(struct seq_file *, + void *), + void (*Write_driver_info)(char *buf, + size_t count, + loff_t *ppos), + void (*Write_device_info)(char *buf, + size_t count, + loff_t *ppos, + void *p)); +void visor_easyproc_DeInitDriver(struct easyproc_driver_info *pdriver); +void visor_easyproc_CreateDeviceProperty(struct easyproc_device_info *p, + void (*show_property_info) + (struct seq_file *, void *), + char *property_name); #endif diff --git a/drivers/staging/unisys/visorutil/memregion.h b/drivers/staging/unisys/visorutil/memregion.h index a1fce7b..bb122db 100644 --- a/drivers/staging/unisys/visorutil/memregion.h +++ b/drivers/staging/unisys/visorutil/memregion.h @@ -25,19 +25,19 @@ */ typedef struct MEMREGION_Tag MEMREGION; -MEMREGION *memregion_create(HOSTADDRESS physaddr, ulong nbytes); -MEMREGION *memregion_create_overlapped(MEMREGION *parent, - ulong offset, ulong nbytes); -int memregion_resize(MEMREGION *memregion, ulong newsize); -int memregion_read(MEMREGION *memregion, +MEMREGION *visor_memregion_create(HOSTADDRESS physaddr, ulong nbytes); +MEMREGION *visor_memregion_create_overlapped(MEMREGION *parent, + ulong offset, ulong nbytes); +int visor_memregion_resize(MEMREGION *memregion, ulong newsize); +int visor_memregion_read(MEMREGION *memregion, ulong offset, void *dest, ulong nbytes); -int memregion_write(MEMREGION *memregion, - ulong offset, void *src, ulong nbytes); -void memregion_destroy(MEMREGION *memregion); -HOSTADDRESS memregion_get_physaddr(MEMREGION *memregion); -ulong memregion_get_nbytes(MEMREGION *memregion); +int visor_memregion_write(MEMREGION *memregion, + ulong offset, void *src, ulong nbytes); +void visor_memregion_destroy(MEMREGION *memregion); +HOSTADDRESS visor_memregion_get_physaddr(MEMREGION *memregion); +ulong visor_memregion_get_nbytes(MEMREGION *memregion); void memregion_dump(MEMREGION *memregion, char *s, ulong off, ulong len, struct seq_file *seq); -void *memregion_get_pointer(MEMREGION *memregion); +void *visor_memregion_get_pointer(MEMREGION *memregion); #endif diff --git a/drivers/staging/unisys/visorutil/memregion_direct.c b/drivers/staging/unisys/visorutil/memregion_direct.c index fbb460f..1c674f1 100644 --- a/drivers/staging/unisys/visorutil/memregion_direct.c +++ b/drivers/staging/unisys/visorutil/memregion_direct.c @@ -38,13 +38,13 @@ static BOOL mapit(MEMREGION *memregion); static void unmapit(MEMREGION *memregion); MEMREGION * -memregion_create(HOSTADDRESS physaddr, ulong nbytes) +visor_memregion_create(HOSTADDRESS physaddr, ulong nbytes) { MEMREGION *rc = NULL; MEMREGION *memregion = kmalloc(sizeof(MEMREGION), GFP_KERNEL|__GFP_NORETRY); if (memregion == NULL) { - ERRDRV("memregion_create allocation failed"); + ERRDRV("visor_memregion_create allocation failed"); return NULL; } memset(memregion, 0, sizeof(MEMREGION)); @@ -58,16 +58,16 @@ memregion_create(HOSTADDRESS physaddr, ulong nbytes) Away: if (rc == NULL) { if (memregion != NULL) { - memregion_destroy(memregion); + visor_memregion_destroy(memregion); memregion = NULL; } } return rc; } -EXPORT_SYMBOL_GPL(memregion_create); +EXPORT_SYMBOL_GPL(visor_memregion_create); MEMREGION * -memregion_create_overlapped(MEMREGION *parent, ulong offset, ulong nbytes) +visor_memregion_create_overlapped(MEMREGION *parent, ulong offset, ulong nbytes) { MEMREGION *memregion = NULL; @@ -98,7 +98,7 @@ memregion_create_overlapped(MEMREGION *parent, ulong offset, ulong nbytes) memregion->overlapped = TRUE; return memregion; } -EXPORT_SYMBOL_GPL(memregion_create_overlapped); +EXPORT_SYMBOL_GPL(visor_memregion_create_overlapped); static BOOL @@ -136,28 +136,28 @@ unmapit(MEMREGION *memregion) } HOSTADDRESS -memregion_get_physaddr(MEMREGION *memregion) +visor_memregion_get_physaddr(MEMREGION *memregion) { return memregion->physaddr; } -EXPORT_SYMBOL_GPL(memregion_get_physaddr); +EXPORT_SYMBOL_GPL(visor_memregion_get_physaddr); ulong -memregion_get_nbytes(MEMREGION *memregion) +visor_memregion_get_nbytes(MEMREGION *memregion) { return memregion->nbytes; } -EXPORT_SYMBOL_GPL(memregion_get_nbytes); +EXPORT_SYMBOL_GPL(visor_memregion_get_nbytes); void * -memregion_get_pointer(MEMREGION *memregion) +visor_memregion_get_pointer(MEMREGION *memregion) { return memregion->mapped; } -EXPORT_SYMBOL_GPL(memregion_get_pointer); +EXPORT_SYMBOL_GPL(visor_memregion_get_pointer); int -memregion_resize(MEMREGION *memregion, ulong newsize) +visor_memregion_resize(MEMREGION *memregion, ulong newsize) { if (newsize == memregion->nbytes) return 0; @@ -174,7 +174,7 @@ memregion_resize(MEMREGION *memregion, ulong newsize) } return 0; } -EXPORT_SYMBOL_GPL(memregion_resize); +EXPORT_SYMBOL_GPL(visor_memregion_resize); static int @@ -195,21 +195,23 @@ memregion_readwrite(BOOL is_write, } int -memregion_read(MEMREGION *memregion, ulong offset, void *dest, ulong nbytes) +visor_memregion_read(MEMREGION *memregion, ulong offset, void *dest, + ulong nbytes) { return memregion_readwrite(FALSE, memregion, offset, dest, nbytes); } -EXPORT_SYMBOL_GPL(memregion_read); +EXPORT_SYMBOL_GPL(visor_memregion_read); int -memregion_write(MEMREGION *memregion, ulong offset, void *src, ulong nbytes) +visor_memregion_write(MEMREGION *memregion, ulong offset, void *src, + ulong nbytes) { return memregion_readwrite(TRUE, memregion, offset, src, nbytes); } -EXPORT_SYMBOL_GPL(memregion_write); +EXPORT_SYMBOL_GPL(visor_memregion_write); void -memregion_destroy(MEMREGION *memregion) +visor_memregion_destroy(MEMREGION *memregion) { if (memregion == NULL) return; @@ -217,5 +219,5 @@ memregion_destroy(MEMREGION *memregion) unmapit(memregion); kfree(memregion); } -EXPORT_SYMBOL_GPL(memregion_destroy); +EXPORT_SYMBOL_GPL(visor_memregion_destroy); diff --git a/drivers/staging/unisys/visorutil/periodic_work.c b/drivers/staging/unisys/visorutil/periodic_work.c index 1350b8e..cc1c678 100644 --- a/drivers/staging/unisys/visorutil/periodic_work.c +++ b/drivers/staging/unisys/visorutil/periodic_work.c @@ -50,11 +50,11 @@ static void periodic_work_func(struct work_struct *work) -PERIODIC_WORK *periodic_work_create(ulong jiffy_interval, - struct workqueue_struct *workqueue, - void (*workfunc)(void *), - void *workfuncarg, - const char *devnam) +PERIODIC_WORK *visor_periodic_work_create(ulong jiffy_interval, + struct workqueue_struct *workqueue, + void (*workfunc)(void *), + void *workfuncarg, + const char *devnam) { PERIODIC_WORK *periodic_work = kmalloc(sizeof(PERIODIC_WORK), GFP_KERNEL|__GFP_NORETRY); @@ -71,17 +71,17 @@ PERIODIC_WORK *periodic_work_create(ulong jiffy_interval, periodic_work->devnam = devnam; return periodic_work; } -EXPORT_SYMBOL_GPL(periodic_work_create); +EXPORT_SYMBOL_GPL(visor_periodic_work_create); -void periodic_work_destroy(PERIODIC_WORK *periodic_work) +void visor_periodic_work_destroy(PERIODIC_WORK *periodic_work) { if (periodic_work == NULL) return; kfree(periodic_work); } -EXPORT_SYMBOL_GPL(periodic_work_destroy); +EXPORT_SYMBOL_GPL(visor_periodic_work_destroy); @@ -90,14 +90,14 @@ EXPORT_SYMBOL_GPL(periodic_work_destroy); * If this function returns FALSE, there was a failure and the * periodic work is no longer scheduled */ -BOOL periodic_work_nextperiod(PERIODIC_WORK *periodic_work) +BOOL visor_periodic_work_nextperiod(PERIODIC_WORK *periodic_work) { BOOL rc = FALSE; write_lock(&periodic_work->lock); if (periodic_work->want_to_stop) { periodic_work->is_scheduled = FALSE; periodic_work->want_to_stop = FALSE; - RETBOOL(TRUE); /* yes, TRUE; see periodic_work_stop() */ + RETBOOL(TRUE); /* yes, TRUE; see visor_periodic_work_stop() */ } else if (queue_delayed_work(periodic_work->workqueue, &periodic_work->work, periodic_work->jiffy_interval) < 0) { @@ -110,7 +110,7 @@ Away: write_unlock(&periodic_work->lock); return rc; } -EXPORT_SYMBOL_GPL(periodic_work_nextperiod); +EXPORT_SYMBOL_GPL(visor_periodic_work_nextperiod); @@ -118,7 +118,7 @@ EXPORT_SYMBOL_GPL(periodic_work_nextperiod); * If this function returns FALSE, then no work was started * (either because it was already started, or because of a failure). */ -BOOL periodic_work_start(PERIODIC_WORK *periodic_work) +BOOL visor_periodic_work_start(PERIODIC_WORK *periodic_work) { BOOL rc = FALSE; @@ -145,7 +145,7 @@ Away: return rc; } -EXPORT_SYMBOL_GPL(periodic_work_start); +EXPORT_SYMBOL_GPL(visor_periodic_work_start); @@ -159,15 +159,15 @@ EXPORT_SYMBOL_GPL(periodic_work_start); * * Do NOT call this function from some function that is running on the * same workqueue as the work you are trying to stop might be running - * on! If you violate this rule, periodic_work_stop() MIGHT work, but it - * also MIGHT get hung up in an infinite loop saying + * on! If you violate this rule, visor_periodic_work_stop() MIGHT work, + * but it also MIGHT get hung up in an infinite loop saying * "waiting for delayed work...". This will happen if the delayed work * you are trying to cancel has been put in the workqueue list, but can't * run yet because we are running that same workqueue thread right now. * - * Bottom line: If you need to call periodic_work_stop() from a workitem, - * be sure the workitem is on a DIFFERENT workqueue than the workitem that - * you are trying to cancel. + * Bottom line: If you need to call visor_periodic_work_stop() from a + * workitem, be sure the workitem is on a DIFFERENT workqueue than the + * workitem that you are trying to cancel. * * If I could figure out some way to check for this "no no" condition in * the code, I would. It would have saved me the trouble of writing this @@ -184,7 +184,7 @@ EXPORT_SYMBOL_GPL(periodic_work_start); * this deadlock, you will get hung up in an infinite loop saying * "waiting for delayed work...". */ -BOOL periodic_work_stop(PERIODIC_WORK *periodic_work) +BOOL visor_periodic_work_stop(PERIODIC_WORK *periodic_work) { BOOL stopped_something = FALSE; @@ -215,7 +215,8 @@ BOOL periodic_work_stop(PERIODIC_WORK *periodic_work) WARNDEV(periodic_work->devnam, "waiting for delayed work..."); /* We rely on the delayed work function running here, - * and eventually calling periodic_work_nextperiod(), + * and eventually calling + * visor_periodic_work_nextperiod(), * which will see that want_to_stop is set, and * subsequently clear is_scheduled. */ @@ -227,4 +228,4 @@ BOOL periodic_work_stop(PERIODIC_WORK *periodic_work) write_unlock(&periodic_work->lock); return stopped_something; } -EXPORT_SYMBOL_GPL(periodic_work_stop); +EXPORT_SYMBOL_GPL(visor_periodic_work_stop); diff --git a/drivers/staging/unisys/visorutil/procobjecttree.c b/drivers/staging/unisys/visorutil/procobjecttree.c index f59b37e..e4d734e 100644 --- a/drivers/staging/unisys/visorutil/procobjecttree.c +++ b/drivers/staging/unisys/visorutil/procobjecttree.c @@ -126,11 +126,11 @@ static const struct file_operations proc_fops = { -MYPROCTYPE *proc_CreateType(struct proc_dir_entry *procDirRoot, - const char **name, - const char **propertyNames, - void (*show_property)(struct seq_file *, - void *, int)) +MYPROCTYPE *visor_proc_CreateType(struct proc_dir_entry *procDirRoot, + const char **name, + const char **propertyNames, + void (*show_property)(struct seq_file *, + void *, int)) { int i = 0; MYPROCTYPE *rc = NULL, *type = NULL; @@ -174,17 +174,17 @@ MYPROCTYPE *proc_CreateType(struct proc_dir_entry *procDirRoot, Away: if (rc == NULL) { if (type != NULL) { - proc_DestroyType(type); + visor_proc_DestroyType(type); type = NULL; } } return rc; } -EXPORT_SYMBOL_GPL(proc_CreateType); +EXPORT_SYMBOL_GPL(visor_proc_CreateType); -void proc_DestroyType(MYPROCTYPE *type) +void visor_proc_DestroyType(MYPROCTYPE *type) { if (type == NULL) return; @@ -206,12 +206,12 @@ void proc_DestroyType(MYPROCTYPE *type) } kfree(type); } -EXPORT_SYMBOL_GPL(proc_DestroyType); +EXPORT_SYMBOL_GPL(visor_proc_DestroyType); -MYPROCOBJECT *proc_CreateObject(MYPROCTYPE *type, - const char *name, void *context) +MYPROCOBJECT *visor_proc_CreateObject(MYPROCTYPE *type, + const char *name, void *context) { MYPROCOBJECT *obj = NULL, *rc = NULL; int i = 0; @@ -272,17 +272,17 @@ MYPROCOBJECT *proc_CreateObject(MYPROCTYPE *type, Away: if (rc == NULL) { if (obj != NULL) { - proc_DestroyObject(obj); + visor_proc_DestroyObject(obj); obj = NULL; } } return rc; } -EXPORT_SYMBOL_GPL(proc_CreateObject); +EXPORT_SYMBOL_GPL(visor_proc_CreateObject); -void proc_DestroyObject(MYPROCOBJECT *obj) +void visor_proc_DestroyObject(MYPROCOBJECT *obj) { MYPROCTYPE *type = NULL; if (obj == NULL) @@ -317,7 +317,7 @@ void proc_DestroyObject(MYPROCOBJECT *obj) } kfree(obj); } -EXPORT_SYMBOL_GPL(proc_DestroyObject); +EXPORT_SYMBOL_GPL(visor_proc_DestroyObject); diff --git a/drivers/staging/unisys/visorutil/visorkmodutils.c b/drivers/staging/unisys/visorutil/visorkmodutils.c index a11a4e0..ed46208 100644 --- a/drivers/staging/unisys/visorutil/visorkmodutils.c +++ b/drivers/staging/unisys/visorutil/visorkmodutils.c @@ -37,8 +37,8 @@ BOOL Debug_Malloc_Enabled = FALSE; * (not including the trailing '\0' byte) * @ingroup internal */ -int hexDumpToBuffer(char *dest, int destSize, char *prefix, char *src, - int srcLen, int bytesToDumpPerLine) +int visor_hexDumpToBuffer(char *dest, int destSize, char *prefix, char *src, + int srcLen, int bytesToDumpPerLine) { int i = 0; int pos = 0; @@ -104,7 +104,7 @@ Away: vfree(line); return rc; } -EXPORT_SYMBOL_GPL(hexDumpToBuffer); +EXPORT_SYMBOL_GPL(visor_hexDumpToBuffer); /** Callers to interfaces that set __GFP_NORETRY flag below @@ -120,12 +120,12 @@ void *kmalloc_kernel(size_t siz) /* Use these handy-dandy seq_file_xxx functions if you want to call some * functions that write stuff into a seq_file, but you actually just want * to dump that output into a buffer. Use them as follows: - * - call seq_file_new_buffer to create the seq_file (you supply the buf) + * - call visor_seq_file_new_buffer to create the seq_file (you supply the buf) * - call whatever functions you want that take a seq_file as an argument * (the buf you supplied will get the output data) - * - call seq_file_done_buffer to dispose of your seq_file + * - call visor_seq_file_done_buffer to dispose of your seq_file */ -struct seq_file *seq_file_new_buffer(void *buf, size_t buf_size) +struct seq_file *visor_seq_file_new_buffer(void *buf, size_t buf_size) { struct seq_file *rc = NULL; struct seq_file *m = kmalloc_kernel(sizeof(struct seq_file)); @@ -138,19 +138,19 @@ struct seq_file *seq_file_new_buffer(void *buf, size_t buf_size) RETPTR(m); Away: if (rc == NULL) { - seq_file_done_buffer(m); + visor_seq_file_done_buffer(m); m = NULL; } return rc; } -EXPORT_SYMBOL_GPL(seq_file_new_buffer); +EXPORT_SYMBOL_GPL(visor_seq_file_new_buffer); -void seq_file_done_buffer(struct seq_file *m) +void visor_seq_file_done_buffer(struct seq_file *m) { if (!m) return; kfree(m); } -EXPORT_SYMBOL_GPL(seq_file_done_buffer); +EXPORT_SYMBOL_GPL(visor_seq_file_done_buffer);