All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor_core@ameritech.net>
To: irda-users@lists.sourceforge.net
Cc: Jean Tourrilhes <jt@hpl.hp.com>, linux-kernel@vger.kernel.org
Subject: [patch 9/9] smsc-ircc2: dont use void * where specific type will do
Date: Wed, 25 May 2005 01:37:47 -0500	[thread overview]
Message-ID: <20050525064006.574361000.dtor_core@ameritech.net> (raw)
In-Reply-To: 20050525063738.864916000.dtor_core@ameritech.net

[-- Attachment #1: ircc2-cleanup2.patch --]
[-- Type: text/plain, Size: 2028 bytes --]

IRDA: smsc-ircc2 - do not over-use void * pointers, use specific
      types wherever possible.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 smsc-ircc2.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

Index: dtor/drivers/net/irda/smsc-ircc2.c
===================================================================
--- dtor.orig/drivers/net/irda/smsc-ircc2.c
+++ dtor/drivers/net/irda/smsc-ircc2.c
@@ -172,8 +172,8 @@ static int  smsc_ircc_hard_xmit_sir(stru
 static int  smsc_ircc_hard_xmit_fir(struct sk_buff *skb, struct net_device *dev);
 static void smsc_ircc_dma_xmit(struct smsc_ircc_cb *self, int bofs);
 static void smsc_ircc_dma_xmit_complete(struct smsc_ircc_cb *self);
-static void smsc_ircc_change_speed(void *priv, u32 speed);
-static void smsc_ircc_set_sir_speed(void *priv, u32 speed);
+static void smsc_ircc_change_speed(struct smsc_ircc_cb *self, u32 speed);
+static void smsc_ircc_set_sir_speed(struct smsc_ircc_cb *self, u32 speed);
 static irqreturn_t smsc_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs);
 static irqreturn_t smsc_ircc_interrupt_sir(struct net_device *dev);
 static void smsc_ircc_sir_start(struct smsc_ircc_cb *self);
@@ -966,9 +966,8 @@ static void smsc_ircc_fir_stop(struct sm
  * This function *must* be called with spinlock held, because it may
  * be called from the irq handler. - Jean II
  */
-static void smsc_ircc_change_speed(void *priv, u32 speed)
+static void smsc_ircc_change_speed(struct smsc_ircc_cb *self, u32 speed)
 {
-	struct smsc_ircc_cb *self = (struct smsc_ircc_cb *) priv;
 	struct net_device *dev;
 	int last_speed_was_sir;
 
@@ -1033,9 +1032,8 @@ static void smsc_ircc_change_speed(void 
  *    Set speed of IrDA port to specified baudrate
  *
  */
-void smsc_ircc_set_sir_speed(void *priv, __u32 speed)
+void smsc_ircc_set_sir_speed(struct smsc_ircc_cb *self, __u32 speed)
 {
-	struct smsc_ircc_cb *self = (struct smsc_ircc_cb *) priv;
 	int iobase;
 	int fcr;    /* FIFO control reg */
 	int lcr;    /* Line control reg */


      parent reply	other threads:[~2005-05-25  6:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-25  6:37 [patch 0/9] smsc-ircc2: sysfs, suspend and other patches Dmitry Torokhov
2005-05-25  6:37 ` [patch 1/9] smsc-ircc2: whitespace fixes Dmitry Torokhov
2005-05-25  6:37 ` [patch 2/9] smsc-ircc2: formatting fixes Dmitry Torokhov
2005-05-25  6:37 ` [patch 3/9] smsc-ircc2: drop DIM macro in favor of ARRAY_SIZE Dmitry Torokhov
2005-05-25  6:37 ` [patch 4/9] smsc-ircc2: remove typedefs Dmitry Torokhov
2005-05-25  6:37 ` [patch 5/9] smsc-ircc2: dont pass iobase around Dmitry Torokhov
2005-05-25  6:37 ` [patch 6/9] smsc-ircc2: add to sysfs as platform device, new PM Dmitry Torokhov
2005-05-25  6:37 ` [patch 7/9] smsc-ircc2: PM cleanup - do not close device when suspending Dmitry Torokhov
2005-05-25  6:37 ` [patch 8/9] smsc-ircc2: use netdev_priv() Dmitry Torokhov
2005-05-25  6:37 ` Dmitry Torokhov [this message]

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=20050525064006.574361000.dtor_core@ameritech.net \
    --to=dtor_core@ameritech.net \
    --cc=irda-users@lists.sourceforge.net \
    --cc=jt@hpl.hp.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.