From: Marc Kleine-Budde Date: Fri, 20 Jul 2012 20:30:40 +0000 (+0200) Subject: can: sja1000: remove obsolete variable open_time X-Git-Tag: v3.8-rc1~139^2~164^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b2d0bf711f94969394a9c4a2f8923c286803cd34;p=platform%2Fupstream%2Fkernel-adaptation-pc.git can: sja1000: remove obsolete variable open_time The variable open_time in the struct sja1000_priv was used to protect sja1000_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 --- diff --git a/drivers/net/can/sja1000/sja1000.c b/drivers/net/can/sja1000/sja1000.c index 25011db..83ee11e 100644 --- a/drivers/net/can/sja1000/sja1000.c +++ b/drivers/net/can/sja1000/sja1000.c @@ -188,11 +188,6 @@ static void sja1000_start(struct net_device *dev) static int sja1000_set_mode(struct net_device *dev, enum can_mode mode) { - struct sja1000_priv *priv = netdev_priv(dev); - - if (!priv->open_time) - return -EINVAL; - switch (mode) { case CAN_MODE_START: sja1000_start(dev); @@ -579,7 +574,6 @@ static int sja1000_open(struct net_device *dev) /* init and start chi */ sja1000_start(dev); - priv->open_time = jiffies; netif_start_queue(dev); @@ -598,8 +592,6 @@ static int sja1000_close(struct net_device *dev) close_candev(dev); - priv->open_time = 0; - return 0; } diff --git a/drivers/net/can/sja1000/sja1000.h b/drivers/net/can/sja1000/sja1000.h index 23fff06..afa9984 100644 --- a/drivers/net/can/sja1000/sja1000.h +++ b/drivers/net/can/sja1000/sja1000.h @@ -152,7 +152,6 @@ */ struct sja1000_priv { struct can_priv can; /* must be the first member */ - int open_time; struct sk_buff *echo_skb; /* the lower-layer is responsible for appropriate locking */