lkml.org 
[lkml]   [2002]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [patch] Input cleanups for 2.5.29 [2/2]
    On Tue, Jul 30, 2002 at 02:46:12PM -0700, Linus Torvalds wrote:

    > - in this case, maybe just adding a new cset is the proper thing.
    > Especially as reversing the cset doesn't actually get you where you
    > want anyway, since you'd still have to do the "unsigned short" -> "u16"
    > translation as yet another cset.

    Ok, here you go:

    ===================================================================

    ChangeSet@1.533, 2002-07-30 23:54:08+02:00, vojtech@suse.cz
    Revert input.h back to kernel types.

    input.h | 84 ++++++++++++++++++++++++++++++++--------------------------------
    1 files changed, 42 insertions(+), 42 deletions(-)

    diff -Nru a/include/linux/input.h b/include/linux/input.h
    --- a/include/linux/input.h Wed Jul 31 00:01:00 2002
    +++ b/include/linux/input.h Wed Jul 31 00:01:00 2002
    @@ -32,7 +32,7 @@
    #else
    #include <sys/time.h>
    #include <sys/ioctl.h>
    -#include <stdint.h>
    +#include <asm/types.h>
    #endif

    /*
    @@ -41,9 +41,9 @@

    struct input_event {
    struct timeval time;
    - uint16_t type;
    - uint16_t code;
    - int32_t value;
    + __u16 type;
    + __u16 code;
    + __s32 value;
    };

    /*
    @@ -57,18 +57,18 @@
    */

    struct input_id {
    - uint16_t bustype;
    - uint16_t vendor;
    - uint16_t product;
    - uint16_t version;
    + __u16 bustype;
    + __u16 vendor;
    + __u16 product;
    + __u16 version;
    };

    struct input_absinfo {
    - int value;
    - int minimum;
    - int maximum;
    - int fuzz;
    - int flat;
    + __s32 value;
    + __s32 minimum;
    + __s32 maximum;
    + __s32 fuzz;
    + __s32 flat;
    };

    #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */
    @@ -611,62 +611,62 @@
    */

    struct ff_replay {
    - uint16_t length; /* Duration of an effect in ms. All other times are also expressed in ms */
    - uint16_t delay; /* Time to wait before to start playing an effect */
    + __u16 length; /* Duration of an effect in ms. All other times are also expressed in ms */
    + __u16 delay; /* Time to wait before to start playing an effect */
    };

    struct ff_trigger {
    - uint16_t button; /* Number of button triggering an effect */
    - uint16_t interval; /* Time to wait before an effect can be re-triggered (ms) */
    + __u16 button; /* Number of button triggering an effect */
    + __u16 interval; /* Time to wait before an effect can be re-triggered (ms) */
    };

    struct ff_envelope {
    - uint16_t attack_length; /* Duration of attack (ms) */
    - uint16_t attack_level; /* Level at beginning of attack */
    - uint16_t fade_length; /* Duration of fade (ms) */
    - uint16_t fade_level; /* Level at end of fade */
    + __u16 attack_length; /* Duration of attack (ms) */
    + __u16 attack_level; /* Level at beginning of attack */
    + __u16 fade_length; /* Duration of fade (ms) */
    + __u16 fade_level; /* Level at end of fade */
    };

    /* FF_CONSTANT */
    struct ff_constant_effect {
    - int16_t level; /* Strength of effect. Negative values are OK */
    + __s16 level; /* Strength of effect. Negative values are OK */
    struct ff_envelope envelope;
    };

    /* FF_RAMP */
    struct ff_ramp_effect {
    - int16_t start_level;
    - int16_t end_level;
    + __s16 start_level;
    + __s16 end_level;
    struct ff_envelope envelope;
    };

    /* FF_SPRING of FF_FRICTION */
    struct ff_condition_effect {
    - uint16_t right_saturation; /* Max level when joystick is on the right */
    - uint16_t left_saturation; /* Max level when joystick in on the left */
    + __u16 right_saturation; /* Max level when joystick is on the right */
    + __u16 left_saturation; /* Max level when joystick in on the left */

    - int16_t right_coeff; /* Indicates how fast the force grows when the
    + __s16 right_coeff; /* Indicates how fast the force grows when the
    joystick moves to the right */
    - int16_t left_coeff; /* Same for left side */
    + __s16 left_coeff; /* Same for left side */

    - uint16_t deadband; /* Size of area where no force is produced */
    - int16_t center; /* Position of dead zone */
    + __u16 deadband; /* Size of area where no force is produced */
    + __s16 center; /* Position of dead zone */

    };

    /* FF_PERIODIC */
    struct ff_periodic_effect {
    - uint16_t waveform; /* Kind of wave (sine, square...) */
    - uint16_t period; /* in ms */
    - int16_t magnitude; /* Peak value */
    - int16_t offset; /* Mean value of wave (roughly) */
    - uint16_t phase; /* 'Horizontal' shift */
    + __u16 waveform; /* Kind of wave (sine, square...) */
    + __u16 period; /* in ms */
    + __s16 magnitude; /* Peak value */
    + __s16 offset; /* Mean value of wave (roughly) */
    + __u16 phase; /* 'Horizontal' shift */

    struct ff_envelope envelope;

    /* Only used if waveform == FF_CUSTOM */
    - uint32_t custom_len; /* Number of samples */
    - int16_t *custom_data; /* Buffer of samples */
    + __u32 custom_len; /* Number of samples */
    + __s16 *custom_data; /* Buffer of samples */
    /* Note: the data pointed by custom_data is copied by the driver. You can
    * therefore dispose of the memory after the upload/update */
    };
    @@ -677,22 +677,22 @@
    by the heavy motor.
    */
    struct ff_rumble_effect {
    - uint16_t strong_magnitude; /* Magnitude of the heavy motor */
    - uint16_t weak_magnitude; /* Magnitude of the light one */
    + __u16 strong_magnitude; /* Magnitude of the heavy motor */
    + __u16 weak_magnitude; /* Magnitude of the light one */
    };

    /*
    * Structure sent through ioctl from the application to the driver
    */
    struct ff_effect {
    - uint16_t type;
    + __u16 type;
    /* Following field denotes the unique id assigned to an effect.
    * If user sets if to -1, a new effect is created, and its id is returned in the same field
    * Else, the user sets it to the effect id it wants to update.
    */
    - int16_t id;
    + __s16 id;

    - uint16_t direction; /* Direction. 0 deg -> 0x0000 (down)
    + __u16 direction; /* Direction. 0 deg -> 0x0000 (down)
    90 deg -> 0x4000 (left)
    180 deg -> 0x8000 (up)
    270 deg -> 0xC000 (right)
    ===================================================================
    This BitKeeper patch contains the following changesets:
    1.533
    ## Wrapped with gzip_uu ##


    begin 664 bkpatch24435
    M'XL(`)P,1ST``[56V7+;.!!\%K]BJO*0:TV!IPZO4SFTF[ARN>S-LPLB(1$Q
    M"2@$*-DN??P.`%*4;">I[&&[2.&8GIZ>!N1'\$6Q>CI8RZ^:987W"-Y)I:<#
    MU2CF9[<X/I<2Q\-"5FS8[AK.KX9<K!KMX?H9U5D!:U:KZ2#PH]V,OEFQZ>#\
    MC[=?/KPZ][R3$WA34+%D%TS#R8FG9;VF9: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*6PRT5\9@6<N-
    M<GEP$@$38@'M:R?X8A_O@E8VVK%0O&M5$EJ5DJA7*6<TGU.1NSA^RZQY:D9-
    M1FR*D"T-5,A=.VAJIXY)G#%S/&SPF52\,Y1!A5LINKP3<RNE>,,E7=X-79OC
    M4]G0]]R9RDS"$\4%^PW4MP9I^+Z_;\H5GE/IN.Y?&X9)19>":[R1'1E&KYRW
    M]K;(Q4(Q;=<_,CRK;GV7MY;-LBAO#O(55"&@B7C\3M8<2]*T?`RJX%U[4^?6
    MM'5K@^<@P]M;5N:PV5S]C:-HM2JQRQ@YZ$@]:W?G5%.[_76#9^1@N\TS)C;/
    M..A[IW0MQ?*RK[SU9CLT$,9&!:/K&Z@D?AWOE;9!A0Y"'PXN[7'8=7+LS#QN
    MS=Q_O\W22627[*NMC>=V(7$+21^3\QJO`7.<[%74C7P@:)TE'+T`<DWP!Y[D
    =<B.>]O^%9P7+KE13G:0Q96F>Q=[?IV!"D>`+````
    `
    end
    --
    Vojtech Pavlik
    SuSE Labs
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:27    [W:3.537 / U:0.908 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site