Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 926d0977 authored by stephen hemminger's avatar stephen hemminger Committed by David S. Miller
Browse files

sky2: rename up/down functions



The code is clearer if the up/down functions are renamed to
open/close like other drivers.  Purely syntax change.

Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f9687c44
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -1728,7 +1728,7 @@ static int sky2_setup_irq(struct sky2_hw *hw, const char *name)


/* Bring up network interface. */
static int sky2_up(struct net_device *dev)
static int sky2_open(struct net_device *dev)
{
	struct sky2_port *sky2 = netdev_priv(dev);
	struct sky2_hw *hw = sky2->hw;
@@ -2098,7 +2098,7 @@ static void sky2_hw_down(struct sky2_port *sky2)
}

/* Network shutdown */
static int sky2_down(struct net_device *dev)
static int sky2_close(struct net_device *dev)
{
	struct sky2_port *sky2 = netdev_priv(dev);
	struct sky2_hw *hw = sky2->hw;
@@ -2601,7 +2601,7 @@ static inline void sky2_tx_done(struct net_device *dev, u16 last)
	if (netif_running(dev)) {
		sky2_tx_complete(sky2, last);

		/* Wake unless it's detached, and called e.g. from sky2_down() */
		/* Wake unless it's detached, and called e.g. from sky2_close() */
		if (tx_avail(sky2) > MAX_SKB_TX_LE + 4)
			netif_wake_queue(dev);
	}
@@ -3391,7 +3391,7 @@ static void sky2_detach(struct net_device *dev)
		netif_tx_lock(dev);
		netif_device_detach(dev);	/* stop txq */
		netif_tx_unlock(dev);
		sky2_down(dev);
		sky2_close(dev);
	}
}

@@ -3401,7 +3401,7 @@ static int sky2_reattach(struct net_device *dev)
	int err = 0;

	if (netif_running(dev)) {
		err = sky2_up(dev);
		err = sky2_open(dev);
		if (err) {
			netdev_info(dev, "could not restart %d\n", err);
			dev_close(dev);
@@ -4568,7 +4568,7 @@ static int sky2_device_event(struct notifier_block *unused,
	struct net_device *dev = ptr;
	struct sky2_port *sky2 = netdev_priv(dev);

	if (dev->netdev_ops->ndo_open != sky2_up || !sky2_debug)
	if (dev->netdev_ops->ndo_open != sky2_open || !sky2_debug)
		return NOTIFY_DONE;

	switch (event) {
@@ -4633,8 +4633,8 @@ static __exit void sky2_debug_cleanup(void)
   not allowing netpoll on second port */
static const struct net_device_ops sky2_netdev_ops[2] = {
  {
	.ndo_open		= sky2_up,
	.ndo_stop		= sky2_down,
	.ndo_open		= sky2_open,
	.ndo_stop		= sky2_close,
	.ndo_start_xmit		= sky2_xmit_frame,
	.ndo_do_ioctl		= sky2_ioctl,
	.ndo_validate_addr	= eth_validate_addr,
@@ -4650,8 +4650,8 @@ static const struct net_device_ops sky2_netdev_ops[2] = {
#endif
  },
  {
	.ndo_open		= sky2_up,
	.ndo_stop		= sky2_down,
	.ndo_open		= sky2_open,
	.ndo_stop		= sky2_close,
	.ndo_start_xmit		= sky2_xmit_frame,
	.ndo_do_ioctl		= sky2_ioctl,
	.ndo_validate_addr	= eth_validate_addr,