summaryrefslogtreecommitdiffstats
path: root/drivers/net/can/usb
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2012-07-20 22:30:40 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2012-11-29 14:33:42 +0100
commit4480c008047d72a7d40e1e7fdc1d3b420ebcb955 (patch)
treeb61a8c9a177973092143c19468e77c715b8f4d8d /drivers/net/can/usb
parentb2d0bf711f94969394a9c4a2f8923c286803cd34 (diff)
downloadop-kernel-dev-4480c008047d72a7d40e1e7fdc1d3b420ebcb955.zip
op-kernel-dev-4480c008047d72a7d40e1e7fdc1d3b420ebcb955.tar.gz
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: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/usb')
-rw-r--r--drivers/net/can/usb/ems_usb.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c
index 086fa32..c69f0b7 100644
--- a/drivers/net/can/usb/ems_usb.c
+++ b/drivers/net/can/usb/ems_usb.c
@@ -245,7 +245,6 @@ struct ems_tx_urb_context {
struct ems_usb {
struct can_priv can; /* must be the first member */
- int open_time;
struct sk_buff *echo_skb[MAX_TX_URBS];
@@ -728,7 +727,6 @@ static int ems_usb_open(struct net_device *netdev)
return err;
}
- dev->open_time = jiffies;
netif_start_queue(netdev);
@@ -878,8 +876,6 @@ static int ems_usb_close(struct net_device *netdev)
close_candev(netdev);
- dev->open_time = 0;
-
return 0;
}
@@ -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);
- if (!dev->open_time)
- return -EINVAL;
-
switch (mode) {
case CAN_MODE_START:
if (ems_usb_write_mode(dev, SJA1000_MOD_NORMAL))
OpenPOWER on IntegriCloud