lkml.org 
[lkml]   [2009]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/4] w35und: merge rest of wbhal.c to phy_calibration.c
Date
Impact: cleanup

The remaining functions are local to phy_calibration.c so move them
there and remove wbhal.c.

Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
drivers/staging/winbond/Makefile | 1 -
drivers/staging/winbond/phy_calibration.c | 19 +++++++++++++++++++
drivers/staging/winbond/wbhal.c | 20 --------------------
drivers/staging/winbond/wbhal_f.h | 4 ----
4 files changed, 19 insertions(+), 25 deletions(-)
delete mode 100644 drivers/staging/winbond/wbhal.c

diff --git a/drivers/staging/winbond/Makefile b/drivers/staging/winbond/Makefile
index b49c973..fb2b7d4 100644
--- a/drivers/staging/winbond/Makefile
+++ b/drivers/staging/winbond/Makefile
@@ -7,7 +7,6 @@ w35und-objs := \
wb35reg.o \
wb35rx.o \
wb35tx.o \
- wbhal.o \
wbusb.o \


diff --git a/drivers/staging/winbond/phy_calibration.c b/drivers/staging/winbond/phy_calibration.c
index af8c01e..8c56962 100644
--- a/drivers/staging/winbond/phy_calibration.c
+++ b/drivers/staging/winbond/phy_calibration.c
@@ -340,6 +340,25 @@ void _sin_cos(s32 angle, s32 *sin, s32 *cos)
}
}

+static unsigned char hal_get_dxx_reg(struct hw_data *pHwData, u16 number, u32 * pValue)
+{
+ if (number < 0x1000)
+ number += 0x1000;
+ return Wb35Reg_ReadSync(pHwData, number, pValue);
+}
+#define hw_get_dxx_reg( _A, _B, _C ) hal_get_dxx_reg( _A, _B, (u32 *)_C )
+
+static unsigned char hal_set_dxx_reg(struct hw_data *pHwData, u16 number, u32 value)
+{
+ unsigned char ret;
+
+ if (number < 0x1000)
+ number += 0x1000;
+ ret = Wb35Reg_WriteSync(pHwData, number, value);
+ return ret;
+}
+#define hw_set_dxx_reg( _A, _B, _C ) hal_set_dxx_reg( _A, _B, (u32)_C )
+

void _reset_rx_cal(struct hw_data *phw_data)
{
diff --git a/drivers/staging/winbond/wbhal.c b/drivers/staging/winbond/wbhal.c
deleted file mode 100644
index b9a6e38..0000000
--- a/drivers/staging/winbond/wbhal.c
+++ /dev/null
@@ -1,20 +0,0 @@
-#include "sysdef.h"
-#include "wbhal_f.h"
-#include "wblinux_f.h"
-
-unsigned char hal_get_dxx_reg(struct hw_data *pHwData, u16 number, u32 * pValue)
-{
- if (number < 0x1000)
- number += 0x1000;
- return Wb35Reg_ReadSync(pHwData, number, pValue);
-}
-
-unsigned char hal_set_dxx_reg(struct hw_data *pHwData, u16 number, u32 value)
-{
- unsigned char ret;
-
- if (number < 0x1000)
- number += 0x1000;
- ret = Wb35Reg_WriteSync(pHwData, number, value);
- return ret;
-}
diff --git a/drivers/staging/winbond/wbhal_f.h b/drivers/staging/winbond/wbhal_f.h
index fd1d3c2..bfdf05d 100644
--- a/drivers/staging/winbond/wbhal_f.h
+++ b/drivers/staging/winbond/wbhal_f.h
@@ -52,8 +52,6 @@ u32 hal_get_bss_pk_cnt( struct hw_data * pHwData );

#define PHY_DEBUG( msg, args... )

-unsigned char hal_get_dxx_reg( struct hw_data * pHwData, u16 number, u32 * pValue );
-unsigned char hal_set_dxx_reg( struct hw_data * pHwData, u16 number, u32 value );
#define hal_get_time_count( _P ) (_P->time_count/10) // return 100ms count
#define hal_detect_error( _P ) (_P->WbUsb.DetectCount)

@@ -68,7 +66,5 @@ unsigned char hal_set_dxx_reg( struct hw_data * pHwData, u16 number, u32 valu
#define hal_join_request_stop(_A)
#define hw_get_cxx_reg( _A, _B, _C )
#define hw_set_cxx_reg( _A, _B, _C )
-#define hw_get_dxx_reg( _A, _B, _C ) hal_get_dxx_reg( _A, _B, (u32 *)_C )
-#define hw_set_dxx_reg( _A, _B, _C ) hal_set_dxx_reg( _A, _B, (u32)_C )


--
1.5.6.3


\
 
 \ /
  Last update: 2009-04-08 10:57    [W:0.060 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site