Commit 4480c008 authored by Marc Kleine-Budde's avatar Marc Kleine-Budde

can: ems_usb: remove obsolete variable open_time

The variable open_time in the struct ems_usb was used to protect
ems_usb_set_mode() only to be called, if the interface is up. Now the CAN
device infrastructure takes care of this.
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent b2d0bf71
...@@ -245,7 +245,6 @@ struct ems_tx_urb_context { ...@@ -245,7 +245,6 @@ struct ems_tx_urb_context {
struct ems_usb { struct ems_usb {
struct can_priv can; /* must be the first member */ struct can_priv can; /* must be the first member */
int open_time;
struct sk_buff *echo_skb[MAX_TX_URBS]; struct sk_buff *echo_skb[MAX_TX_URBS];
...@@ -728,7 +727,6 @@ static int ems_usb_open(struct net_device *netdev) ...@@ -728,7 +727,6 @@ static int ems_usb_open(struct net_device *netdev)
return err; return err;
} }
dev->open_time = jiffies;
netif_start_queue(netdev); netif_start_queue(netdev);
...@@ -878,8 +876,6 @@ static int ems_usb_close(struct net_device *netdev) ...@@ -878,8 +876,6 @@ static int ems_usb_close(struct net_device *netdev)
close_candev(netdev); close_candev(netdev);
dev->open_time = 0;
return 0; return 0;
} }
...@@ -905,9 +901,6 @@ static int ems_usb_set_mode(struct net_device *netdev, enum can_mode mode) ...@@ -905,9 +901,6 @@ static int ems_usb_set_mode(struct net_device *netdev, enum can_mode mode)
{ {
struct ems_usb *dev = netdev_priv(netdev); struct ems_usb *dev = netdev_priv(netdev);
if (!dev->open_time)
return -EINVAL;
switch (mode) { switch (mode) {
case CAN_MODE_START: case CAN_MODE_START:
if (ems_usb_write_mode(dev, SJA1000_MOD_NORMAL)) if (ems_usb_write_mode(dev, SJA1000_MOD_NORMAL))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment