Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159445
b: refs/heads/master
c: 5da63cc
h: refs/heads/master
i:
  159443: dacda49
v: v3
  • Loading branch information
Rémi Denis-Courmont authored and David S. Miller committed Aug 13, 2009
1 parent bc1ffec commit fae5f63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aa11d958d1a6572eda08214d7c6a735804fe48a5
refs/heads/master: 5da63cc4b2258e1c06ee41637492717481025143
14 changes: 2 additions & 12 deletions trunk/drivers/usb/gadget/f_phonet.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,20 +261,10 @@ static int pn_net_xmit(struct sk_buff *skb, struct net_device *dev)

static int pn_net_mtu(struct net_device *dev, int new_mtu)
{
struct phonet_port *port = netdev_priv(dev);
unsigned long flags;
int err = -EBUSY;

if ((new_mtu < PHONET_MIN_MTU) || (new_mtu > PHONET_MAX_MTU))
return -EINVAL;

spin_lock_irqsave(&port->lock, flags);
if (!netif_carrier_ok(dev)) {
dev->mtu = new_mtu;
err = 0;
}
spin_unlock_irqrestore(&port->lock, flags);
return err;
dev->mtu = new_mtu;
return 0;
}

static const struct net_device_ops pn_netdev_ops = {
Expand Down

0 comments on commit fae5f63

Please sign in to comment.