Commit 395ac660 authored by Chris Wright's avatar Chris Wright Committed by Jeff Garzik

[PATCH] remove redundant check in de2104x ->get_regs()

Trivial patchlet...ethtool core already caps regs.len at a max of
->get_regs_len():

	reglen = ops->get_regs_len(dev);
	if (regs.len > reglen)
		regs.len = reglen;

So doing the same in the in de2104x driver ->get_regs() is redundant.
Patch below simply removes it to clarify the guarantee of the API.
parent 98cd917c
...@@ -1676,8 +1676,6 @@ static void de_get_regs(struct net_device *dev, struct ethtool_regs *regs, ...@@ -1676,8 +1676,6 @@ static void de_get_regs(struct net_device *dev, struct ethtool_regs *regs,
{ {
struct de_private *de = dev->priv; struct de_private *de = dev->priv;
if (regs->len > DE_REGS_SIZE)
regs->len = DE_REGS_SIZE;
regs->version = (DE_REGS_VER << 2) | de->de21040; regs->version = (DE_REGS_VER << 2) | de->de21040;
spin_lock_irq(&de->lock); spin_lock_irq(&de->lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment