Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Staging: w35und: merge rest of wbhal.c to phy_calibration.c

Impact: cleanup

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

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Pekka Enberg and committed by
Greg Kroah-Hartman
dd68e1b4 40abfccb

+19 -25
-1
drivers/staging/winbond/Makefile
··· 7 7 wb35reg.o \ 8 8 wb35rx.o \ 9 9 wb35tx.o \ 10 - wbhal.o \ 11 10 wbusb.o \ 12 11 13 12
+19
drivers/staging/winbond/phy_calibration.c
··· 340 340 } 341 341 } 342 342 343 + static unsigned char hal_get_dxx_reg(struct hw_data *pHwData, u16 number, u32 * pValue) 344 + { 345 + if (number < 0x1000) 346 + number += 0x1000; 347 + return Wb35Reg_ReadSync(pHwData, number, pValue); 348 + } 349 + #define hw_get_dxx_reg( _A, _B, _C ) hal_get_dxx_reg( _A, _B, (u32 *)_C ) 350 + 351 + static unsigned char hal_set_dxx_reg(struct hw_data *pHwData, u16 number, u32 value) 352 + { 353 + unsigned char ret; 354 + 355 + if (number < 0x1000) 356 + number += 0x1000; 357 + ret = Wb35Reg_WriteSync(pHwData, number, value); 358 + return ret; 359 + } 360 + #define hw_set_dxx_reg( _A, _B, _C ) hal_set_dxx_reg( _A, _B, (u32)_C ) 361 + 343 362 344 363 void _reset_rx_cal(struct hw_data *phw_data) 345 364 {
-20
drivers/staging/winbond/wbhal.c
··· 1 - #include "sysdef.h" 2 - #include "wbhal_f.h" 3 - #include "wblinux_f.h" 4 - 5 - unsigned char hal_get_dxx_reg(struct hw_data *pHwData, u16 number, u32 * pValue) 6 - { 7 - if (number < 0x1000) 8 - number += 0x1000; 9 - return Wb35Reg_ReadSync(pHwData, number, pValue); 10 - } 11 - 12 - unsigned char hal_set_dxx_reg(struct hw_data *pHwData, u16 number, u32 value) 13 - { 14 - unsigned char ret; 15 - 16 - if (number < 0x1000) 17 - number += 0x1000; 18 - ret = Wb35Reg_WriteSync(pHwData, number, value); 19 - return ret; 20 - }
-4
drivers/staging/winbond/wbhal_f.h
··· 52 52 53 53 #define PHY_DEBUG( msg, args... ) 54 54 55 - unsigned char hal_get_dxx_reg( struct hw_data * pHwData, u16 number, u32 * pValue ); 56 - unsigned char hal_set_dxx_reg( struct hw_data * pHwData, u16 number, u32 value ); 57 55 #define hal_get_time_count( _P ) (_P->time_count/10) // return 100ms count 58 56 #define hal_detect_error( _P ) (_P->WbUsb.DetectCount) 59 57 ··· 66 68 #define hal_join_request_stop(_A) 67 69 #define hw_get_cxx_reg( _A, _B, _C ) 68 70 #define hw_set_cxx_reg( _A, _B, _C ) 69 - #define hw_get_dxx_reg( _A, _B, _C ) hal_get_dxx_reg( _A, _B, (u32 *)_C ) 70 - #define hw_set_dxx_reg( _A, _B, _C ) hal_set_dxx_reg( _A, _B, (u32)_C ) 71 71 72 72