Commit aad3d31f authored by Devendra Naga's avatar Devendra Naga Committed by Greg Kroah-Hartman
Browse files

staging: csr: remove the CsrTime typedef altogether



remove CsrTime typedef and replace all the users with the u32

Signed-off-by: default avatarDevendra Naga <devendra.aaru@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cf7d9b42
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -201,7 +201,7 @@ void CsrLogTimedEventIn(u32 line,
    const char *file,
    CsrSchedQid task_id,
    CsrSchedTid tid,
    CsrTime requested_delay,
    u32 requested_delay,
    u16 fniarg,
    const void *fnvarg);

+6 −6
Original line number Diff line number Diff line
@@ -37,10 +37,10 @@ typedef CsrSchedIdentifier CsrSchedTid;
typedef void (*schedEntryFunction_t)(void **inst);

/* Time constants. */
#define CSR_SCHED_TIME_MAX                ((CsrTime) 0xFFFFFFFF)
#define CSR_SCHED_MILLISECOND             ((CsrTime) (1000))
#define CSR_SCHED_SECOND                  ((CsrTime) (1000 * CSR_SCHED_MILLISECOND))
#define CSR_SCHED_MINUTE                  ((CsrTime) (60 * CSR_SCHED_SECOND))
#define CSR_SCHED_TIME_MAX                (0xFFFFFFFF)
#define CSR_SCHED_MILLISECOND             (1000)
#define CSR_SCHED_SECOND                  (1000 * CSR_SCHED_MILLISECOND)
#define CSR_SCHED_MINUTE                  (60 * CSR_SCHED_SECOND)

/* Queue and primitive that identifies the environment */
#define CSR_SCHED_TASK_ID        0xFFFF
@@ -218,7 +218,7 @@ u8 CsrSchedMessageGet(u16 *pmi, void **pmv);
 *
 *----------------------------------------------------------------------------*/
#if defined(CSR_LOG_ENABLE) && defined(CSR_LOG_INCLUDE_FILE_NAME_AND_LINE_NUMBER)
CsrSchedTid CsrSchedTimerSetStringLog(CsrTime delay,
CsrSchedTid CsrSchedTimerSetStringLog(u32 delay,
    void (*fn)(u16 mi, void *mv),
    u16 fniarg,
    void *fnvarg,
@@ -226,7 +226,7 @@ CsrSchedTid CsrSchedTimerSetStringLog(CsrTime delay,
    const char *file);
#define CsrSchedTimerSet(d, fn, fni, fnv) CsrSchedTimerSetStringLog((d), (fn), (fni), (fnv), __LINE__, __FILE__)
#else
CsrSchedTid CsrSchedTimerSet(CsrTime delay,
CsrSchedTid CsrSchedTimerSet(u32 delay,
    void (*fn)(u16 mi, void *mv),
    u16 fniarg,
    void *fnvarg);
+4 −4
Original line number Diff line number Diff line
@@ -14,19 +14,19 @@

#include "csr_time.h"

CsrTime CsrTimeGet(CsrTime *high)
u32 CsrTimeGet(u32 *high)
{
	struct timespec ts;
	u64 time;
	CsrTime low;
	u32 low;

	ts = current_kernel_time();
	time = (u64) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;

	if (high != NULL)
		*high = (CsrTime) ((time >> 32) & 0xFFFFFFFF);
		*high = (u32) ((time >> 32) & 0xFFFFFFFF);

	low = (CsrTime) (time & 0xFFFFFFFF);
	low = (u32) (time & 0xFFFFFFFF);

	return low;
}
+1 −14
Original line number Diff line number Diff line
@@ -18,19 +18,6 @@ extern "C" {

/*******************************************************************************

NAME
	CsrTime

DESCRIPTION
	Type to hold a value describing the current system time, which is a
	measure of time elapsed since some arbitrarily defined fixed time
	reference, usually associated with system startup.

*******************************************************************************/
typedef u32 CsrTime;

/*******************************************************************************

NAME
	CsrTimeGet

@@ -55,7 +42,7 @@ RETURNS
	Low part of current system time in microseconds.

*******************************************************************************/
CsrTime CsrTimeGet(CsrTime *high);
u32 CsrTimeGet(u32 *high);


/*------------------------------------------------------------------*/
+2 −2
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@
typedef struct coredump_buf
{
    u16  count;                       /* serial number of dump */
    CsrTime    timestamp;                   /* host's system time at capture */
    u32  timestamp;                   /* host's system time at capture */
    s16   requestor;                   /* request: 0=auto dump, 1=manual */
    u16  chip_ver;
    u32  fw_ver;
@@ -192,7 +192,7 @@ CsrResult unifi_coredump_capture(card_t *card, struct unifi_coredump_req *req)
{
    CsrResult r = CSR_RESULT_SUCCESS;
    static u16 dump_seq_no = 1;
    CsrTime time_of_capture;
    u32 time_of_capture;

    func_enter();

Loading