Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@redhat.com>2004-04-14 12:50:03 -0400
committerJeff Garzik <jgarzik@redhat.com>2004-04-14 12:50:03 -0400
commit5d4bb599d8bc0e53eb6ee1e2049353f34c66c0f2 (patch)
tree3883cd90c34a51b155cc4724af5b16b1eda4f2d6
parent62e88cfdeabf75516364a9ab914c4120b4a25221 (diff)
parentfb320b95ffb2f406ccff907f60704cd88ff2c047 (diff)
Merge redhat.com:/spare/repo/netdev-2.6/janitor
into redhat.com:/spare/repo/net-drivers-2.6
-rw-r--r--drivers/net/dgrs.c8
-rw-r--r--drivers/net/gt96100eth.c2
-rw-r--r--drivers/net/irda/smsc-ircc2.c6
-rw-r--r--drivers/net/irda/via-ircc.c2
-rw-r--r--drivers/net/net_init.c8
-rw-r--r--drivers/net/pcmcia/nmclan_cs.c32
-rw-r--r--drivers/net/pcmcia/xirc2ps_cs.c32
-rw-r--r--drivers/net/tc35815.c7
-rw-r--r--drivers/net/wan/lmc/lmc_proto.c1
-rw-r--r--drivers/net/wan/lmc/lmc_proto_raw.h4
-rw-r--r--drivers/net/wan/lmc/lmc_ver.h123
-rw-r--r--drivers/net/wireless/orinoco.h4
-rw-r--r--include/linux/netdevice.h7
13 files changed, 58 insertions, 178 deletions
diff --git a/drivers/net/dgrs.c b/drivers/net/dgrs.c
index 04c00c224924..45492c1ad817 100644
--- a/drivers/net/dgrs.c
+++ b/drivers/net/dgrs.c
@@ -327,8 +327,10 @@ check_board_dma(struct net_device *dev0)
*/
priv0->vplxdma[PLX_DMA0_MODE/4] = 0xFFFFFFFF;
x = priv0->vplxdma[PLX_DMA0_MODE/4];
- if (x != 0x00001FFF)
+ if (x != 0x00001FFF) {
+ iounmap((void *)priv0->vplxdma);
return (0);
+ }
return (1);
}
@@ -1020,6 +1022,8 @@ dgrs_download(struct net_device *dev0)
if (!is)
{
printk("%s: Illegal IRQ %d\n", dev0->name, dev0->irq);
+ iounmap(priv0->vmem);
+ priv0->vmem = NULL;
return -ENXIO;
}
OUTB(dev0->base_addr + ES4H_AS_31_24,
@@ -1101,6 +1105,8 @@ dgrs_download(struct net_device *dev0)
if (priv0->bcomm->bc_status < BC_RUN)
{
printk("%s: board not operating\n", dev0->name);
+ iounmap(priv0->vmem);
+ priv0->vmem = NULL;
return -ENXIO;
}
diff --git a/drivers/net/gt96100eth.c b/drivers/net/gt96100eth.c
index 333ee371fd92..9c84abba0567 100644
--- a/drivers/net/gt96100eth.c
+++ b/drivers/net/gt96100eth.c
@@ -1212,7 +1212,7 @@ gt96100_rx(struct net_device *dev, u32 status)
cmdstat, nextOut);
if (cmdstat & (u32)rxOwn) {
- //err(__FUNCTION__ ": device owns descriptor!\n");
+ //err("%s: device owns descriptor!\n", __FUNCTION__);
// DMA is not finished updating descriptor???
// Leave and come back later to pick-up where
// we left off.
diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c
index e57ec51ce2f6..e360323c2665 100644
--- a/drivers/net/irda/smsc-ircc2.c
+++ b/drivers/net/irda/smsc-ircc2.c
@@ -1429,7 +1429,7 @@ static irqreturn_t smsc_ircc_interrupt(int irq, void *dev_id, struct pt_regs *re
}
if (iir & IRCC_IIR_ACTIVE_FRAME) {
- /*printk(KERN_WARNING __FUNCTION__ "(): Active Frame\n");*/
+ /*printk(KERN_WARNING "%s(): Active Frame\n", __FUNCTION__);*/
}
/* Enable interrupts again */
@@ -1995,7 +1995,7 @@ static int __init smsc_ircc_look_for_chips(void)
while(address->cfg_base){
cfg_base = address->cfg_base;
- /*printk(KERN_WARNING __FUNCTION__ "(): probing: 0x%02x for: 0x%02x\n", cfg_base, address->type);*/
+ /*printk(KERN_WARNING "%s(): probing: 0x%02x for: 0x%02x\n", __FUNCTION__, cfg_base, address->type);*/
if( address->type & SMSCSIO_TYPE_FDC){
type = "FDC";
@@ -2040,7 +2040,7 @@ static int __init smsc_superio_flat(const smsc_chip_t *chips, unsigned short cfg
outb(SMSCSIOFLAT_UARTMODE0C_REG, cfgbase);
mode = inb(cfgbase+1);
- /*printk(KERN_WARNING __FUNCTION__ "(): mode: 0x%02x\n", mode);*/
+ /*printk(KERN_WARNING "%s(): mode: 0x%02x\n", __FUNCTION__, mode);*/
if(!(mode & SMSCSIOFLAT_UART2MODE_VAL_IRDA))
WARNING("%s(): IrDA not enabled\n", __FUNCTION__);
diff --git a/drivers/net/irda/via-ircc.c b/drivers/net/irda/via-ircc.c
index 1e87f1c69f88..95b9c32514ec 100644
--- a/drivers/net/irda/via-ircc.c
+++ b/drivers/net/irda/via-ircc.c
@@ -360,7 +360,7 @@ static __devinit int via_ircc_open(int i, chipio_t * info, unsigned int id)
/* Reserve the ioports that we need */
if (!request_region(self->io.fir_base, self->io.fir_ext, driver_name)) {
-// WARNING(__FUNCTION__ "(), can't get iobase of 0x%03x\n",self->io.fir_base);
+// WARNING("%s(), can't get iobase of 0x%03x\n", __FUNCTION__, self->io.fir_base);
err = -ENODEV;
goto err_out1;
}
diff --git a/drivers/net/net_init.c b/drivers/net/net_init.c
index 718108487c1e..854bc2b70cee 100644
--- a/drivers/net/net_init.c
+++ b/drivers/net/net_init.c
@@ -79,8 +79,9 @@ struct net_device *alloc_netdev(int sizeof_priv, const char *mask,
/* ensure 32-byte alignment of both the device and private area */
- alloc_size = (sizeof(struct net_device) + 31) & ~31;
- alloc_size += sizeof_priv + 31;
+ alloc_size = (sizeof(struct net_device) + NETDEV_ALIGN_CONST)
+ & ~NETDEV_ALIGN_CONST;
+ alloc_size += sizeof_priv + NETDEV_ALIGN_CONST;
p = kmalloc (alloc_size, GFP_KERNEL);
if (!p) {
@@ -90,7 +91,8 @@ struct net_device *alloc_netdev(int sizeof_priv, const char *mask,
memset(p, 0, alloc_size);
- dev = (struct net_device *)(((long)p + 31) & ~31);
+ dev = (struct net_device *)(((long)p + NETDEV_ALIGN_CONST)
+ & ~NETDEV_ALIGN_CONST);
dev->padded = (char *)dev - (char *)p;
if (sizeof_priv)
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c
index e76bdf11a7bf..07cac888ba3d 100644
--- a/drivers/net/pcmcia/nmclan_cs.c
+++ b/drivers/net/pcmcia/nmclan_cs.c
@@ -470,7 +470,7 @@ static dev_link_t *nmclan_attach(void)
dev = alloc_etherdev(sizeof(mace_private));
if (!dev)
return NULL;
- lp = dev->priv;
+ lp = netdev_priv(dev);
link = &lp->link;
link->priv = dev;
@@ -707,7 +707,7 @@ static void nmclan_config(dev_link_t *link)
{
client_handle_t handle = link->handle;
struct net_device *dev = link->priv;
- mace_private *lp = dev->priv;
+ mace_private *lp = netdev_priv(dev);
tuple_t tuple;
cisparse_t parse;
u_char buf[64];
@@ -875,7 +875,7 @@ nmclan_reset
---------------------------------------------------------------------------- */
static void nmclan_reset(struct net_device *dev)
{
- mace_private *lp = dev->priv;
+ mace_private *lp = netdev_priv(dev);
#if RESET_XILINX
dev_link_t *link = &lp->link;
@@ -944,7 +944,7 @@ mace_open
static int mace_open(struct net_device *dev)
{
ioaddr_t ioaddr = dev->base_addr;
- mace_private *lp = dev->priv;
+ mace_private *lp = netdev_priv(dev);
dev_link_t *link = &lp->link;
if (!DEV_OK(link))
@@ -967,7 +967,7 @@ mace_close
static int mace_close(struct net_device *dev)
{
ioaddr_t ioaddr = dev->base_addr;
- mace_private *lp = dev->priv;
+ mace_private *lp = netdev_priv(dev);
dev_link_t *link = &lp->link;
DEBUG(2, "%s: shutting down ethercard.\n", dev->name);
@@ -1022,7 +1022,7 @@ mace_start_xmit
static void mace_tx_timeout(struct net_device *dev)
{
- mace_private *lp = (mace_private *)dev->priv;
+ mace_private *lp = netdev_priv(dev);
dev_link_t *link = &lp->link;
printk(KERN_NOTICE "%s: transmit timed out -- ", dev->name);
@@ -1038,7 +1038,7 @@ static void mace_tx_timeout(struct net_device *dev)
static int mace_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
- mace_private *lp = (mace_private *)dev->priv;
+ mace_private *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr;
netif_stop_queue(dev);
@@ -1099,7 +1099,7 @@ mace_interrupt
static irqreturn_t mace_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
struct net_device *dev = (struct net_device *) dev_id;
- mace_private *lp = dev->priv;
+ mace_private *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr;
int status;
int IntrCnt = MACE_MAX_IR_ITERATIONS;
@@ -1241,7 +1241,7 @@ mace_rx
---------------------------------------------------------------------------- */
static int mace_rx(struct net_device *dev, unsigned char RxCnt)
{
- mace_private *lp = (mace_private *)dev->priv;
+ mace_private *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr;
unsigned char rx_framecnt;
unsigned short rx_status;
@@ -1408,7 +1408,7 @@ update_stats
---------------------------------------------------------------------------- */
static void update_stats(ioaddr_t ioaddr, struct net_device *dev)
{
- mace_private *lp = (mace_private *)dev->priv;
+ mace_private *lp = netdev_priv(dev);
lp->mace_stats.rcvcc += mace_read(lp, ioaddr, MACE_RCVCC);
lp->mace_stats.rntpc += mace_read(lp, ioaddr, MACE_RNTPC);
@@ -1454,7 +1454,7 @@ mace_get_stats
---------------------------------------------------------------------------- */
static struct net_device_stats *mace_get_stats(struct net_device *dev)
{
- mace_private *lp = (mace_private *)dev->priv;
+ mace_private *lp = netdev_priv(dev);
update_stats(dev->base_addr, dev);
@@ -1549,7 +1549,7 @@ Input
---------------------------------------------------------------------------- */
static void restore_multicast_list(struct net_device *dev)
{
- mace_private *lp = (mace_private *)dev->priv;
+ mace_private *lp = netdev_priv(dev);
int num_addrs = lp->multicast_num_addrs;
int *ladrf = lp->multicast_ladrf;
ioaddr_t ioaddr = dev->base_addr;
@@ -1606,7 +1606,7 @@ Output
static void set_multicast_list(struct net_device *dev)
{
- mace_private *lp = (mace_private *)dev->priv;
+ mace_private *lp = netdev_priv(dev);
int adr[ETHER_ADDR_LEN] = {0}; /* Ethernet address */
int i;
struct dev_mc_list *dmi = dev->mc_list;
@@ -1645,10 +1645,10 @@ static void set_multicast_list(struct net_device *dev)
static void restore_multicast_list(struct net_device *dev)
{
ioaddr_t ioaddr = dev->base_addr;
- mace_private *lp = (mace_private *)dev->priv;
+ mace_private *lp = netdev_priv(dev);
DEBUG(2, "%s: restoring Rx mode to %d addresses.\n", dev->name,
- ((mace_private *)(dev->priv))->multicast_num_addrs);
+ lp->multicast_num_addrs);
if (dev->flags & IFF_PROMISC) {
/* Promiscuous mode: receive all packets */
@@ -1665,7 +1665,7 @@ static void restore_multicast_list(struct net_device *dev)
static void set_multicast_list(struct net_device *dev)
{
- mace_private *lp = (mace_private *)dev->priv;
+ mace_private *lp = netdev_priv(dev);
#ifdef PCMCIA_DEBUG
if (pc_debug > 1) {
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c
index c1560ef2b386..f6e47d77ea82 100644
--- a/drivers/net/pcmcia/xirc2ps_cs.c
+++ b/drivers/net/pcmcia/xirc2ps_cs.c
@@ -595,7 +595,7 @@ xirc2ps_attach(void)
dev = alloc_etherdev(sizeof(local_info_t));
if (!dev)
return NULL;
- local = dev->priv;
+ local = netdev_priv(dev);
link = &local->link;
link->priv = dev;
@@ -710,7 +710,7 @@ static int
set_card_type(dev_link_t *link, const void *s)
{
struct net_device *dev = link->priv;
- local_info_t *local = dev->priv;
+ local_info_t *local = netdev_priv(dev);
#ifdef PCMCIA_DEBUG
unsigned cisrev = ((const unsigned char *)s)[2];
#endif
@@ -805,7 +805,7 @@ xirc2ps_config(dev_link_t * link)
{
client_handle_t handle = link->handle;
struct net_device *dev = link->priv;
- local_info_t *local = dev->priv;
+ local_info_t *local = netdev_priv(dev);
tuple_t tuple;
cisparse_t parse;
ioaddr_t ioaddr;
@@ -1159,7 +1159,7 @@ xirc2ps_release(dev_link_t *link)
if (link->win) {
struct net_device *dev = link->priv;
- local_info_t *local = dev->priv;
+ local_info_t *local = netdev_priv(dev);
if (local->dingo)
iounmap(local->dingo_ccr - 0x0800);
pcmcia_release_window(link->win);
@@ -1246,7 +1246,7 @@ static irqreturn_t
xirc2ps_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
struct net_device *dev = (struct net_device *)dev_id;
- local_info_t *lp = dev->priv;
+ local_info_t *lp = netdev_priv(dev);
ioaddr_t ioaddr;
u_char saved_page;
unsigned bytes_rcvd;
@@ -1468,7 +1468,7 @@ xirc2ps_interrupt(int irq, void *dev_id, struct pt_regs *regs)
static void
do_tx_timeout(struct net_device *dev)
{
- local_info_t *lp = dev->priv;
+ local_info_t *lp = netdev_priv(dev);
printk(KERN_NOTICE "%s: transmit timed out\n", dev->name);
lp->stats.tx_errors++;
/* reset the card */
@@ -1480,7 +1480,7 @@ do_tx_timeout(struct net_device *dev)
static int
do_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
- local_info_t *lp = dev->priv;
+ local_info_t *lp = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr;
int okay;
unsigned freespace;
@@ -1537,7 +1537,7 @@ do_start_xmit(struct sk_buff *skb, struct net_device *dev)
static struct net_device_stats *
do_get_stats(struct net_device *dev)
{
- local_info_t *lp = dev->priv;
+ local_info_t *lp = netdev_priv(dev);
/* lp->stats.rx_missed_errors = GetByte(?) */
return &lp->stats;
@@ -1552,7 +1552,7 @@ static void
set_addresses(struct net_device *dev)
{
ioaddr_t ioaddr = dev->base_addr;
- local_info_t *lp = dev->priv;
+ local_info_t *lp = netdev_priv(dev);
struct dev_mc_list *dmi = dev->mc_list;
char *addr;
int i,j,k,n;
@@ -1617,7 +1617,7 @@ set_multicast_list(struct net_device *dev)
static int
do_config(struct net_device *dev, struct ifmap *map)
{
- local_info_t *local = dev->priv;
+ local_info_t *local = netdev_priv(dev);
DEBUG(0, "do_config(%p)\n", dev);
if (map->port != 255 && map->port != dev->if_port) {
@@ -1643,7 +1643,7 @@ do_config(struct net_device *dev, struct ifmap *map)
static int
do_open(struct net_device *dev)
{
- local_info_t *lp = dev->priv;
+ local_info_t *lp = netdev_priv(dev);
dev_link_t *link = &lp->link;
DEBUG(0, "do_open(%p)\n", dev);
@@ -1676,7 +1676,7 @@ static struct ethtool_ops netdev_ethtool_ops = {
static int
do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
- local_info_t *local = dev->priv;
+ local_info_t *local = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr;
u16 *data = (u16 *)&rq->ifr_data;
@@ -1708,7 +1708,7 @@ do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
static void
hardreset(struct net_device *dev)
{
- local_info_t *local = dev->priv;
+ local_info_t *local = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr;
SelectPage(4);
@@ -1725,7 +1725,7 @@ hardreset(struct net_device *dev)
static void
do_reset(struct net_device *dev, int full)
{
- local_info_t *local = dev->priv;
+ local_info_t *local = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr;
unsigned value;
@@ -1886,7 +1886,7 @@ do_reset(struct net_device *dev, int full)
static int
init_mii(struct net_device *dev)
{
- local_info_t *local = dev->priv;
+ local_info_t *local = netdev_priv(dev);
ioaddr_t ioaddr = dev->base_addr;
unsigned control, status, linkpartner;
int i;
@@ -1973,7 +1973,7 @@ static int
do_stop(struct net_device *dev)
{
ioaddr_t ioaddr = dev->base_addr;
- local_info_t *lp = dev->priv;
+ local_info_t *lp = netdev_priv(dev);
dev_link_t *link = &lp->link;
DEBUG(0, "do_stop(%p)\n", dev);
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c
index d7be1469eeca..5d6862ebff22 100644
--- a/drivers/net/tc35815.c
+++ b/drivers/net/tc35815.c
@@ -1724,12 +1724,7 @@ static struct pci_driver tc35815_driver = {
static int __init tc35815_init_module(void)
{
- int err;
-
- if ((err = pci_module_init(&tc35815_driver)) < 0 )
- return err;
- else
- return 0;
+ return pci_module_init(&tc35815_driver);
}
static void __exit tc35815_cleanup_module(void)
diff --git a/drivers/net/wan/lmc/lmc_proto.c b/drivers/net/wan/lmc/lmc_proto.c
index 68a7fcde4f92..de2e2258c246 100644
--- a/drivers/net/wan/lmc/lmc_proto.c
+++ b/drivers/net/wan/lmc/lmc_proto.c
@@ -50,7 +50,6 @@
#include "lmc_debug.h"
#include "lmc_ioctl.h"
#include "lmc_proto.h"
-//#include "lmc_proto_raw.h"
/*
* The compile-time variable SPPPSTUP causes the module to be
diff --git a/drivers/net/wan/lmc/lmc_proto_raw.h b/drivers/net/wan/lmc/lmc_proto_raw.h
deleted file mode 100644
index c07c0b3302ba..000000000000
--- a/drivers/net/wan/lmc/lmc_proto_raw.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifndef _LMC_PROTO_RAW_H_
-#define _LMC_PROTO_RAW_H_
-
-#endif
diff --git a/drivers/net/wan/lmc/lmc_ver.h b/drivers/net/wan/lmc/lmc_ver.h
deleted file mode 100644
index 75ea93765c7c..000000000000
--- a/drivers/net/wan/lmc/lmc_ver.h
+++ /dev/null
@@ -1,123 +0,0 @@
-#include <linux/version.h>
-
-#ifndef _IF_LMC_LINUXVER_
-#define _IF_LMC_LINUXVER_
-
- /*
- * Copyright (c) 1997-2000 LAN Media Corporation (LMC)
- * All rights reserved. www.lanmedia.com
- *
- * This code is written by:
- * Andrew Stanley-Jones (asj@cban.com)
- * Rob Braun (bbraun@vix.com),
- * Michael Graff (explorer@vix.com) and
- * Matt Thomas (matt@3am-software.com).
- *
- * This software may be used and distributed according to the terms
- * of the GNU General Public License version 2, incorporated herein by reference.
- */
-
- /*
- * This file defines and controls all linux version
- * differences.
- *
- * This is being done to keep 1 central location where all linux
- * version differences can be kept and maintained. as this code was
- * found version issues where pepered throughout the source code and
- * made the souce code not only hard to read but version problems hard
- * to track down. If I'm overiding a function/etc with something in
- * this file it will be prefixed by "LMC_" which will mean look
- * here for the version dependent change that's been done.
- *
- */
-
-#if LINUX_VERSION_CODE < 0x20363
-#define net_device device
-#endif
-
-#if LINUX_VERSION_CODE < 0x20363
-#define LMC_XMITTER_BUSY(x) (x)->tbusy = 1
-#define LMC_XMITTER_FREE(x) (x)->tbusy = 0
-#define LMC_XMITTER_INIT(x) (x)->tbusy = 0
-#else
-#define LMC_XMITTER_BUSY(x) netif_stop_queue(x)
-#define LMC_XMITTER_FREE(x) netif_wake_queue(x)
-#define LMC_XMITTER_INIT(x) netif_start_queue(x)
-
-#endif
-
-
-#if LINUX_VERSION_CODE < 0x20100
-//typedef unsigned int u_int32_t;
-
-#define LMC_SETUP_20_DEV {\
- int indx; \
- for (indx = 0; indx < DEV_NUMBUFFS; indx++) \
- skb_queue_head_init (&dev->buffs[indx]); \
- } \
- dev->family = AF_INET; \
- dev->pa_addr = 0; \
- dev->pa_brdaddr = 0; \
- dev->pa_mask = 0xFCFFFFFF; \
- dev->pa_alen = 4; /* IP addr. sizeof(u32) */
-
-#else
-
-#define LMC_SETUP_20_DEV
-
-#endif
-
-
-#if LINUX_VERSION_CODE < 0x20155 /* basically 2.2 plus */
-
-#define LMC_DEV_KFREE_SKB(skb) dev_kfree_skb((skb), FREE_WRITE)
-
-#else /* Mostly 2.0 kernels */
-
-#define LMC_DEV_KFREE_SKB(skb) dev_kfree_skb(skb)
-
-#endif
-
-#if LINUX_VERSION_CODE < 0x20200
-#else
-
-#endif
-
-#if LINUX_VERSION_CODE < 0x20100
-#define LMC_SKB_FREE(skb, val) (skb->free = val)
-#else
-#define LMC_SKB_FREE(skb, val)
-#endif
-
-
-#if (LINUX_VERSION_CODE >= 0x20200)
-
-#define LMC_SPIN_FLAGS unsigned long flags;
-#define LMC_SPIN_LOCK_INIT(x) spin_lock_init(&(x)->lmc_lock);
-#define LMC_SPIN_UNLOCK(x) ((x)->lmc_lock = SPIN_LOCK_UNLOCKED)
-#define LMC_SPIN_LOCK_IRQSAVE(x) spin_lock_irqsave (&(x)->lmc_lock, flags);
-#define LMC_SPIN_UNLOCK_IRQRESTORE(x) spin_unlock_irqrestore (&(x)->lmc_lock, flags);
-#else
-#define LMC_SPIN_FLAGS
-#define LMC_SPIN_LOCK_INIT(x)
-#define LMC_SPIN_UNLOCK(x)
-#define LMC_SPIN_LOCK_IRQSAVE(x)
-#define LMC_SPIN_UNLOCK_IRQRESTORE(x)
-#endif
-
-
-#if LINUX_VERSION_CODE >= 0x20100
-#define LMC_COPY_FROM_USER(x, y, z) if(copy_from_user ((x), (y), (z))) return -EFAULT
-#define LMC_COPY_TO_USER(x, y, z) if(copy_to_user ((x), (y), (z))) return -EFAULT
-#else
-#define LMC_COPY_FROM_USER(x, y, z) if(verify_area(VERIFY_READ, (y), (z))) \
- return -EFAULT; \
- memcpy_fromfs ((x), (y), (z))
-
-#define LMC_COPY_TO_USER(x, y, z) if(verify_area(VERIFY_WRITE, (x), (z))) \
- return -EFAULT; \
- memcpy_tofs ((x), (y), (z))
-#endif
-
-
-#endif
diff --git a/drivers/net/wireless/orinoco.h b/drivers/net/wireless/orinoco.h
index 6eb9e8541dc5..972a8510f60f 100644
--- a/drivers/net/wireless/orinoco.h
+++ b/drivers/net/wireless/orinoco.h
@@ -125,8 +125,8 @@ extern int orinoco_debug;
#define DEBUG(n, args...) do { } while (0)
#endif /* ORINOCO_DEBUG */
-#define TRACE_ENTER(devname) DEBUG(2, "%s: -> " __FUNCTION__ "()\n", devname);
-#define TRACE_EXIT(devname) DEBUG(2, "%s: <- " __FUNCTION__ "()\n", devname);
+#define TRACE_ENTER(devname) DEBUG(2, "%s: -> %s()\n", devname, __FUNCTION__);
+#define TRACE_EXIT(devname) DEBUG(2, "%s: <- %s()\n", devname, __FUNCTION__);
extern struct net_device *alloc_orinocodev(int sizeof_card,
int (*hard_reset)(struct orinoco_private *));
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 378777e11e94..5c5a551fe630 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -484,9 +484,14 @@ struct net_device
int padded;
};
+#define NETDEV_ALIGN 32
+#define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1)
+
static inline void *netdev_priv(struct net_device *dev)
{
- return (char *)dev + ((sizeof(struct net_device) + 31) & ~31);
+ return (char *)dev + ((sizeof(struct net_device)
+ + NETDEV_ALIGN_CONST)
+ & ~NETDEV_ALIGN_CONST);
}
#define SET_MODULE_OWNER(dev) do { } while (0)