]> err.no Git - linux-2.6/commitdiff
[PATCH] smsc-ircc2: dont use void * where specific type will do
authorDmitry Torokhov <dtor_core@ameritech.net>
Tue, 6 Sep 2005 22:19:24 +0000 (15:19 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 7 Sep 2005 23:57:59 +0000 (16:57 -0700)
IRDA: smsc-ircc2 - do not over-use void * pointers, use specific
      types wherever possible.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Cc: Jean Tourrilhes <jt@hpl.hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/net/irda/smsc-ircc2.c

index 236501f0c5a6654681755c86cd2d9fed15af52db..2c9d3309314c97261fd01e9d167fa9d1a3a2df71 100644 (file)
@@ -172,8 +172,8 @@ static int  smsc_ircc_hard_xmit_sir(struct sk_buff *skb, struct net_device *dev)
 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);
@@ -964,9 +964,8 @@ static void smsc_ircc_fir_stop(struct smsc_ircc_cb *self)
  * 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;
 
@@ -1031,9 +1030,8 @@ static void smsc_ircc_change_speed(void *priv, u32 speed)
  *    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 */