X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Finput%2Fjoystick%2Fiforce%2Fiforce.h;h=947df273984399384fd0e8aece218ac388cadb43;hb=6f3a28f7d1f0a65a78443c273b6e8ec01becf301;hp=e9924d6f01b33991b975de0272588f6f0691ea7e;hpb=ae3e0218621db0590163b2d5c424ef1f340e3cc6;p=pandora-kernel.git diff --git a/drivers/input/joystick/iforce/iforce.h b/drivers/input/joystick/iforce/iforce.h index e9924d6f01b3..947df2739843 100644 --- a/drivers/input/joystick/iforce/iforce.h +++ b/drivers/input/joystick/iforce/iforce.h @@ -51,10 +51,7 @@ #define IFORCE_232 1 #define IFORCE_USB 2 -#define FALSE 0 -#define TRUE 1 - -#define FF_EFFECTS_MAX 32 +#define IFORCE_EFFECTS_MAX 32 /* Each force feedback effect is made of one core effect, which can be * associated to at most to effect modifiers @@ -67,24 +64,11 @@ #define FF_CORE_UPDATE 5 /* Effect is being updated */ #define FF_MODCORE_MAX 5 -#define CHECK_OWNERSHIP(i, iforce) \ - ((i) < FF_EFFECTS_MAX && i >= 0 && \ - test_bit(FF_CORE_IS_USED, (iforce)->core_effects[(i)].flags) && \ - (current->pid == 0 || \ - (iforce)->core_effects[(i)].owner == current->pid)) - struct iforce_core_effect { /* Information about where modifiers are stored in the device's memory */ struct resource mod1_chunk; struct resource mod2_chunk; unsigned long flags[NBITS(FF_MODCORE_MAX)]; - pid_t owner; - /* Used to keep track of parameters of an effect. They are needed - * to know what parts of an effect changed in an update operation. - * We try to send only parameter packets if possible, as sending - * effect parameter requires the effect to be stoped and restarted - */ - struct ff_effect effect; }; #define FF_CMD_EFFECT 0x010e @@ -145,7 +129,7 @@ struct iforce { /* Force Feedback */ wait_queue_head_t wait; struct resource device_memory; - struct iforce_core_effect core_effects[FF_EFFECTS_MAX]; + struct iforce_core_effect core_effects[IFORCE_EFFECTS_MAX]; struct mutex mem_mutex; }; @@ -182,9 +166,9 @@ void iforce_dump_packet(char *msg, u16 cmd, unsigned char *data) ; int iforce_get_id_packet(struct iforce *iforce, char *packet); /* iforce-ff.c */ -int iforce_upload_periodic(struct iforce*, struct ff_effect*, int is_update); -int iforce_upload_constant(struct iforce*, struct ff_effect*, int is_update); -int iforce_upload_condition(struct iforce*, struct ff_effect*, int is_update); +int iforce_upload_periodic(struct iforce *, struct ff_effect *, struct ff_effect *); +int iforce_upload_constant(struct iforce *, struct ff_effect *, struct ff_effect *); +int iforce_upload_condition(struct iforce *, struct ff_effect *, struct ff_effect *); /* Public variables */ extern struct serio_driver iforce_serio_drv;