I-Force joystick - remove some pointless casts
PATCH 1/1 I-Force joystick - remove some pointless casts
The 'private' member of struct input_dev is a void*, so no need to cast it when assigning it to a struct iforce* variable.
Signed-off-by Jesper Juhl <[email protected]>
---
drivers/input/joystick/iforce/iforce-main.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
drivers/input/joystick/iforce/iforce-main.c +5 -5
@@ -84,7 +84,7 @@ static struct iforce_device iforce_devicstatic int iforce_playback (struct input_dev *dev,int effect_id,int value) { -struct iforce * iforce = (struct iforce *)(dev->private); +struct iforce * iforce = dev->private;if (value >0 ) {set_bit (FF_CORE_SHOULD_PLAY , iforce->core_effects[effect_id].flags); }
@@ -98,7 +98,7 @@ static int iforce_playback(struct input_static void iforce_set_gain (struct input_dev *dev,u16 gain) { -struct iforce * iforce = (struct iforce *)(dev->private); +struct iforce * iforce = dev->private;unsigned char data[3 ]; data[0 ] = gain >>9 ;iforce_send_packet (iforce,FF_CMD_GAIN , data);
@@ -106,7 +106,7 @@ static void iforce_set_gain(struct inputstatic void iforce_set_autocenter (struct input_dev *dev,u16 magnitude) { -struct iforce * iforce = (struct iforce *)(dev->private); +struct iforce * iforce = dev->private;unsigned char data[3 ]; data[0 ] =0x03 ; data[1 ] = magnitude >>9 ;
@@ -123,7 +123,7 @@ static void iforce_set_autocenter(struct*/ static int iforce_upload_effect (struct input_dev *dev,struct ff_effect *effect,struct ff_effect *old) { -struct iforce * iforce = (struct iforce *)(dev->private); +struct iforce * iforce = dev->private;int ret;if (!old) {
@@ -171,7 +171,7 @@ static int iforce_upload_effect(struct i*/ static int iforce_erase_effect (struct input_dev *dev,int effect_id) { -struct iforce * iforce = (struct iforce *)(dev->private); +struct iforce * iforce = dev->private;int err =0 ;struct iforce_core_effect * core_effect;