mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jesper Juhl <jesper.juhl@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org, vojtech@ucw.cz, deneux@ifrance.com, jesper.juhl@gmail.com
Subject: [PATCH] I-Force joystick - remove some pointless casts
Date: Thu, 15 Jun 2006 01:16:58 +0200	[thread overview]
Message-ID: <200606150116.59425.jesper.juhl@gmail.com> (raw)

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;
 

                 reply	other threads:[~2006-06-14 23:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200606150116.59425.jesper.juhl@gmail.com \
    --to=jesper.juhl@gmail.com \
    --cc=akpm@osdl.org \
    --cc=deneux@ifrance.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vojtech@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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