• Anton Vorontsov's avatar
    gianfar: Some cleanups for startup_gfar() · ccc05c6e
    Anton Vorontsov authored
    We're going to split the startup_gfar() into 3 separate functions,
    so let's cleanup the code a little bit so that cosmetic changes
    won't distract attention from logical ones.
    
    - Remove needless casts (e.g. (struct sk_buff **)kmalloc());
    - Turn 'unsigned long vaddr;' into 'void *vaddr', to avoid casting;
    - Add new 'struct device *dev' variable as a shorthand for
      '&priv->ofdev->dev' that is used all over the place, also rename
      'struct net_device *dev' to 'struct net_device *ndev';
    - Turn printk(KERN_ERR ...) to pr_err(...), which is shorter;
    - Don't return bogus -1 (i.e. -EPERM) when request_irq() fails;
    - Turn '&priv->regs->' to just '&regs->'.
    Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    ccc05c6e
gianfar.c 61.5 KB