mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] I-Force joystick - remove some pointless casts
@ 2006-06-14 23:16 Jesper Juhl
  0 siblings, 0 replies; only message in thread
From: Jesper Juhl @ 2006-06-14 23:16 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, vojtech, deneux, jesper.juhl

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 <jesper.juhl@gmail.com>
---

 drivers/input/joystick/iforce/iforce-main.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

--- linux-2.6.17-rc6-mm2-orig/drivers/input/joystick/iforce/iforce-main.c	2006-06-12 18:37:13.000000000 +0200
+++ linux-2.6.17-rc6-mm2/drivers/input/joystick/iforce/iforce-main.c	2006-06-15 00:53:17.000000000 +0200
@@ -84,7 +84,7 @@ static struct iforce_device iforce_devic
 
 static 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 input
 
 static 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;
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-06-14 23:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-14 23:16 [PATCH] I-Force joystick - remove some pointless casts Jesper Juhl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome