diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2012-07-20 16:30:40 -0400 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2012-11-29 08:34:06 -0500 |
commit | 823d7a1f761d6404babaab04cc8b1724186cf2c8 (patch) | |
tree | f5279b5d87e9f2c79eff026e80aeed38f57408df /drivers/net/can | |
parent | e42870465025ac6c9f3dc45f45a69d3da2d85308 (diff) |
can: pcan_usb_core: remove obsolete variable open_time
The variable open_time in the struct peak_usb_device was used to protect
peak_usb_set_mode() only to be called, if the interface is up. Now the CAN
device infrastructure takes care of this.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can')
-rw-r--r-- | drivers/net/can/usb/peak_usb/pcan_usb_core.c | 5 | ||||
-rw-r--r-- | drivers/net/can/usb/peak_usb/pcan_usb_core.h | 1 |
2 files changed, 0 insertions, 6 deletions
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c b/drivers/net/can/usb/peak_usb/pcan_usb_core.c index c4643c400d46..d9290ea788e0 100644 --- a/drivers/net/can/usb/peak_usb/pcan_usb_core.c +++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.c | |||
@@ -520,7 +520,6 @@ static int peak_usb_ndo_open(struct net_device *netdev) | |||
520 | return err; | 520 | return err; |
521 | } | 521 | } |
522 | 522 | ||
523 | dev->open_time = jiffies; | ||
524 | netif_start_queue(netdev); | 523 | netif_start_queue(netdev); |
525 | 524 | ||
526 | return 0; | 525 | return 0; |
@@ -576,7 +575,6 @@ static int peak_usb_ndo_stop(struct net_device *netdev) | |||
576 | 575 | ||
577 | close_candev(netdev); | 576 | close_candev(netdev); |
578 | 577 | ||
579 | dev->open_time = 0; | ||
580 | dev->can.state = CAN_STATE_STOPPED; | 578 | dev->can.state = CAN_STATE_STOPPED; |
581 | 579 | ||
582 | /* can set bus off now */ | 580 | /* can set bus off now */ |
@@ -661,9 +659,6 @@ static int peak_usb_set_mode(struct net_device *netdev, enum can_mode mode) | |||
661 | struct peak_usb_device *dev = netdev_priv(netdev); | 659 | struct peak_usb_device *dev = netdev_priv(netdev); |
662 | int err = 0; | 660 | int err = 0; |
663 | 661 | ||
664 | if (!dev->open_time) | ||
665 | return -EINVAL; | ||
666 | |||
667 | switch (mode) { | 662 | switch (mode) { |
668 | case CAN_MODE_START: | 663 | case CAN_MODE_START: |
669 | err = peak_usb_restart(dev); | 664 | err = peak_usb_restart(dev); |
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.h b/drivers/net/can/usb/peak_usb/pcan_usb_core.h index c8e5e91d7cb5..073b47ff8eee 100644 --- a/drivers/net/can/usb/peak_usb/pcan_usb_core.h +++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.h | |||
@@ -104,7 +104,6 @@ struct peak_usb_device { | |||
104 | struct can_priv can; | 104 | struct can_priv can; |
105 | struct peak_usb_adapter *adapter; | 105 | struct peak_usb_adapter *adapter; |
106 | unsigned int ctrl_idx; | 106 | unsigned int ctrl_idx; |
107 | int open_time; | ||
108 | u32 state; | 107 | u32 state; |
109 | 108 | ||
110 | struct sk_buff *echo_skb[PCAN_USB_MAX_TX_URBS]; | 109 | struct sk_buff *echo_skb[PCAN_USB_MAX_TX_URBS]; |