mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-13 17:28:56 +00:00
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: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f9687c44d3
commit
926d0977b2
@ -1728,7 +1728,7 @@ static int sky2_setup_irq(struct sky2_hw *hw, const char *name)
|
|||||||
|
|
||||||
|
|
||||||
/* Bring up network interface. */
|
/* 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_port *sky2 = netdev_priv(dev);
|
||||||
struct sky2_hw *hw = sky2->hw;
|
struct sky2_hw *hw = sky2->hw;
|
||||||
@ -2098,7 +2098,7 @@ static void sky2_hw_down(struct sky2_port *sky2)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Network shutdown */
|
/* 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_port *sky2 = netdev_priv(dev);
|
||||||
struct sky2_hw *hw = sky2->hw;
|
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)) {
|
if (netif_running(dev)) {
|
||||||
sky2_tx_complete(sky2, last);
|
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)
|
if (tx_avail(sky2) > MAX_SKB_TX_LE + 4)
|
||||||
netif_wake_queue(dev);
|
netif_wake_queue(dev);
|
||||||
}
|
}
|
||||||
@ -3391,7 +3391,7 @@ static void sky2_detach(struct net_device *dev)
|
|||||||
netif_tx_lock(dev);
|
netif_tx_lock(dev);
|
||||||
netif_device_detach(dev); /* stop txq */
|
netif_device_detach(dev); /* stop txq */
|
||||||
netif_tx_unlock(dev);
|
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;
|
int err = 0;
|
||||||
|
|
||||||
if (netif_running(dev)) {
|
if (netif_running(dev)) {
|
||||||
err = sky2_up(dev);
|
err = sky2_open(dev);
|
||||||
if (err) {
|
if (err) {
|
||||||
netdev_info(dev, "could not restart %d\n", err);
|
netdev_info(dev, "could not restart %d\n", err);
|
||||||
dev_close(dev);
|
dev_close(dev);
|
||||||
@ -4568,7 +4568,7 @@ static int sky2_device_event(struct notifier_block *unused,
|
|||||||
struct net_device *dev = ptr;
|
struct net_device *dev = ptr;
|
||||||
struct sky2_port *sky2 = netdev_priv(dev);
|
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;
|
return NOTIFY_DONE;
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
@ -4633,8 +4633,8 @@ static __exit void sky2_debug_cleanup(void)
|
|||||||
not allowing netpoll on second port */
|
not allowing netpoll on second port */
|
||||||
static const struct net_device_ops sky2_netdev_ops[2] = {
|
static const struct net_device_ops sky2_netdev_ops[2] = {
|
||||||
{
|
{
|
||||||
.ndo_open = sky2_up,
|
.ndo_open = sky2_open,
|
||||||
.ndo_stop = sky2_down,
|
.ndo_stop = sky2_close,
|
||||||
.ndo_start_xmit = sky2_xmit_frame,
|
.ndo_start_xmit = sky2_xmit_frame,
|
||||||
.ndo_do_ioctl = sky2_ioctl,
|
.ndo_do_ioctl = sky2_ioctl,
|
||||||
.ndo_validate_addr = eth_validate_addr,
|
.ndo_validate_addr = eth_validate_addr,
|
||||||
@ -4650,8 +4650,8 @@ static const struct net_device_ops sky2_netdev_ops[2] = {
|
|||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.ndo_open = sky2_up,
|
.ndo_open = sky2_open,
|
||||||
.ndo_stop = sky2_down,
|
.ndo_stop = sky2_close,
|
||||||
.ndo_start_xmit = sky2_xmit_frame,
|
.ndo_start_xmit = sky2_xmit_frame,
|
||||||
.ndo_do_ioctl = sky2_ioctl,
|
.ndo_do_ioctl = sky2_ioctl,
|
||||||
.ndo_validate_addr = eth_validate_addr,
|
.ndo_validate_addr = eth_validate_addr,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user