lkml.org 
[lkml]   [2010]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 25/26] w35und: Rename fixed typedef to fixp32_t
Date
The 'fixed' typedef is the one and only typedef that actually makes
sense. Lets rename the thing to 'fixp32_t' to follow the naming
convention set by generic kernel types such as 'atomic_t' and the
existing in-kernel fixed-point implementation in
drivers/input/fixp-arith.h (which is unfortunately only 16 bits and thus
can't be used here).

Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
drivers/staging/winbond/phy_calibration.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/winbond/phy_calibration.c b/drivers/staging/winbond/phy_calibration.c
index 8c56962..381d8e9 100644
--- a/drivers/staging/winbond/phy_calibration.c
+++ b/drivers/staging/winbond/phy_calibration.c
@@ -26,9 +26,9 @@
#define DEG2RAD(X) 0.017453 * (X)

/****************** LOCAL TYPE DEFINITION SECTION ***************************/
-typedef s32 fixed; /* 16.16 fixed-point */
+typedef s32 fixp32_t; /* 16.16 fixed-point */

-static const fixed Angles[]=
+static const fixp32_t Angles[]=
{
FIXED(DEG2RAD(45.0)), FIXED(DEG2RAD(26.565)), FIXED(DEG2RAD(14.0362)),
FIXED(DEG2RAD(7.12502)), FIXED(DEG2RAD(3.57633)), FIXED(DEG2RAD(1.78991)),
@@ -300,7 +300,7 @@ u32 _sqrt(u32 sqsum)
/****************************************************************************/
void _sin_cos(s32 angle, s32 *sin, s32 *cos)
{
- fixed X, Y, TargetAngle, CurrAngle;
+ fixp32_t X, Y, TargetAngle, CurrAngle;
unsigned Step;

X=FIXED(AG_CONST); // AG_CONST * cos(0)
@@ -310,7 +310,7 @@ void _sin_cos(s32 angle, s32 *sin, s32 *cos)

for (Step=0; Step < 12; Step++)
{
- fixed NewX;
+ fixp32_t NewX;

if(TargetAngle > CurrAngle)
{
--
1.6.3.3


\
 
 \ /
  Last update: 2010-03-01 16:21    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site