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:05 -0500 |
commit | e42870465025ac6c9f3dc45f45a69d3da2d85308 (patch) | |
tree | 736fafa9c34ef1e349858116cd0f1791c4068cf5 /drivers/net/can | |
parent | 4480c008047d72a7d40e1e7fdc1d3b420ebcb955 (diff) |
can: esd_usb2: remove obsolete variable open_time
The variable open_time in the struct esd_usb2_net_priv was used to protect
esd_usb2_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/esd_usb2.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/net/can/usb/esd_usb2.c b/drivers/net/can/usb/esd_usb2.c index 124e0dd3490c..9b74d1e3ad44 100644 --- a/drivers/net/can/usb/esd_usb2.c +++ b/drivers/net/can/usb/esd_usb2.c | |||
@@ -217,7 +217,6 @@ struct esd_usb2_net_priv { | |||
217 | struct usb_anchor tx_submitted; | 217 | struct usb_anchor tx_submitted; |
218 | struct esd_tx_urb_context tx_contexts[MAX_TX_URBS]; | 218 | struct esd_tx_urb_context tx_contexts[MAX_TX_URBS]; |
219 | 219 | ||
220 | int open_time; | ||
221 | struct esd_usb2 *usb2; | 220 | struct esd_usb2 *usb2; |
222 | struct net_device *netdev; | 221 | struct net_device *netdev; |
223 | int index; | 222 | int index; |
@@ -695,8 +694,6 @@ static int esd_usb2_open(struct net_device *netdev) | |||
695 | return err; | 694 | return err; |
696 | } | 695 | } |
697 | 696 | ||
698 | priv->open_time = jiffies; | ||
699 | |||
700 | netif_start_queue(netdev); | 697 | netif_start_queue(netdev); |
701 | 698 | ||
702 | return 0; | 699 | return 0; |
@@ -864,8 +861,6 @@ static int esd_usb2_close(struct net_device *netdev) | |||
864 | 861 | ||
865 | close_candev(netdev); | 862 | close_candev(netdev); |
866 | 863 | ||
867 | priv->open_time = 0; | ||
868 | |||
869 | return 0; | 864 | return 0; |
870 | } | 865 | } |
871 | 866 | ||
@@ -941,11 +936,6 @@ static int esd_usb2_get_berr_counter(const struct net_device *netdev, | |||
941 | 936 | ||
942 | static int esd_usb2_set_mode(struct net_device *netdev, enum can_mode mode) | 937 | static int esd_usb2_set_mode(struct net_device *netdev, enum can_mode mode) |
943 | { | 938 | { |
944 | struct esd_usb2_net_priv *priv = netdev_priv(netdev); | ||
945 | |||
946 | if (!priv->open_time) | ||
947 | return -EINVAL; | ||
948 | |||
949 | switch (mode) { | 939 | switch (mode) { |
950 | case CAN_MODE_START: | 940 | case CAN_MODE_START: |
951 | netif_wake_queue(netdev); | 941 | netif_wake_queue(netdev); |