irda: Removed all unused timeval variables
authorChunyan Zhang <zhang.chunyan@linaro.org>
Thu, 8 Jan 2015 04:01:27 +0000 (12:01 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Jan 2015 02:39:40 +0000 (21:39 -0500)
In the file au1k_ir.c & via-ircc.h, there were two unused definitions of the
timeval type members, this commit therefore removes this unneeded code.

In other three files, the same problem is the rx_time member is only ever
written, never read, so removed it entirely.

Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/irda/au1k_ir.c
drivers/net/irda/kingsun-sir.c
drivers/net/irda/ks959-sir.c
drivers/net/irda/mcs7780.c
drivers/net/irda/mcs7780.h
drivers/net/irda/via-ircc.h

index e151205..44e4f38 100644 (file)
@@ -24,7 +24,6 @@
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
-#include <linux/time.h>
 #include <linux/types.h>
 #include <linux/ioport.h>
 
@@ -163,8 +162,6 @@ struct au1k_private {
        iobuff_t rx_buff;
 
        struct net_device *netdev;
-       struct timeval stamp;
-       struct timeval now;
        struct qos_info qos;
        struct irlap_cb *irlap;
 
index e638893..fb5d162 100644 (file)
@@ -114,7 +114,6 @@ struct kingsun_cb {
                                           (usually 8) */
 
        iobuff_t          rx_buff;      /* receive unwrap state machine */
-       struct timeval    rx_time;
        spinlock_t lock;
        int receiving;
 
@@ -235,7 +234,6 @@ static void kingsun_rcv_irq(struct urb *urb)
                                                  &kingsun->netdev->stats,
                                                  &kingsun->rx_buff, bytes[i]);
                        }
-                       do_gettimeofday(&kingsun->rx_time);
                        kingsun->receiving =
                                (kingsun->rx_buff.state != OUTSIDE_FRAME)
                                ? 1 : 0;
@@ -273,7 +271,6 @@ static int kingsun_net_open(struct net_device *netdev)
 
        skb_reserve(kingsun->rx_buff.skb, 1);
        kingsun->rx_buff.head = kingsun->rx_buff.skb->data;
-       do_gettimeofday(&kingsun->rx_time);
 
        kingsun->rx_urb = usb_alloc_urb(0, GFP_KERNEL);
        if (!kingsun->rx_urb)
index e6b3804..8e6e0ed 100644 (file)
@@ -187,7 +187,6 @@ struct ks959_cb {
        __u8 *rx_buf;
        __u8 rx_variable_xormask;
        iobuff_t rx_unwrap_buff;
-       struct timeval rx_time;
 
        struct usb_ctrlrequest *speed_setuprequest;
        struct urb *speed_urb;
@@ -476,7 +475,6 @@ static void ks959_rcv_irq(struct urb *urb)
                                                  bytes[i]);
                        }
                }
-               do_gettimeofday(&kingsun->rx_time);
                kingsun->receiving =
                    (kingsun->rx_unwrap_buff.state != OUTSIDE_FRAME) ? 1 : 0;
        }
@@ -514,7 +512,6 @@ static int ks959_net_open(struct net_device *netdev)
 
        skb_reserve(kingsun->rx_unwrap_buff.skb, 1);
        kingsun->rx_unwrap_buff.head = kingsun->rx_unwrap_buff.skb->data;
-       do_gettimeofday(&kingsun->rx_time);
 
        kingsun->rx_urb = usb_alloc_urb(0, GFP_KERNEL);
        if (!kingsun->rx_urb)
index e4d678f..bca6a1e 100644 (file)
@@ -722,7 +722,6 @@ static int mcs_net_open(struct net_device *netdev)
 
        skb_reserve(mcs->rx_buff.skb, 1);
        mcs->rx_buff.head = mcs->rx_buff.skb->data;
-       do_gettimeofday(&mcs->rx_time);
 
        /*
         * Now that everything should be initialized properly,
@@ -799,7 +798,6 @@ static void mcs_receive_irq(struct urb *urb)
                        mcs_unwrap_fir(mcs, urb->transfer_buffer,
                                urb->actual_length);
                }
-               do_gettimeofday(&mcs->rx_time);
        }
 
        ret = usb_submit_urb(urb, GFP_ATOMIC);
index b10689b..a6e8f7d 100644 (file)
@@ -116,7 +116,6 @@ struct mcs_cb {
        __u8 *fifo_status;
 
        iobuff_t rx_buff;       /* receive unwrap state machine */
-       struct timeval rx_time;
        spinlock_t lock;
        int receiving;
 
index 7ce820e..ac15255 100644 (file)
@@ -29,7 +29,6 @@ this program; if not, see <http://www.gnu.org/licenses/>.
  ********************************************************************/
 #ifndef via_IRCC_H
 #define via_IRCC_H
-#include <linux/time.h>
 #include <linux/spinlock.h>
 #include <linux/pm.h>
 #include <linux/types.h>
@@ -106,9 +105,6 @@ struct via_ircc_cb {
 
        __u8 ier;               /* Interrupt enable register */
 
-       struct timeval stamp;
-       struct timeval now;
-
        spinlock_t lock;        /* For serializing operations */
 
        __u32 flags;            /* Interface flags */