Commit be9332c2 authored by Adrian Bunk's avatar Adrian Bunk Committed by Jeff Garzik

[wan lmc] remove 2.0.x-era code

The patch below removes obsolete #if'd code for kernel 2.0 and 2.2 from
drivers/net/wan/lmc/* (this includes the expansion of some #define's 
that were definded differently for different kernel versions).
parent 95a52644
......@@ -2,9 +2,7 @@
#include <linux/types.h>
#include <linux/netdevice.h>
#include <linux/interrupt.h>
#include <linux/version.h>
#include "lmc_ver.h"
#include "lmc_debug.h"
/*
......
This diff is collapsed.
/* $Id: lmc_media.c,v 1.13 2000/04/11 05:25:26 asj Exp $ */
#include <linux/version.h>
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/string.h>
......@@ -11,9 +10,6 @@
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#if LINUX_VERSION_CODE < 0x20155
#include <linux/bios32.h>
#endif
#include <linux/in.h>
#include <linux/if_arp.h>
#include <linux/netdevice.h>
......@@ -28,11 +24,8 @@
#include <asm/io.h>
#include <asm/dma.h>
#if LINUX_VERSION_CODE >= 0x20200
#include <asm/uaccess.h>
#endif
#include "lmc_ver.h"
#include "lmc.h"
#include "lmc_var.h"
#include "lmc_ioctl.h"
......
......@@ -19,7 +19,6 @@
* Driver for the LanMedia LMC5200, LMC5245, LMC1000, LMC1200 cards.
*/
#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/timer.h>
......@@ -46,7 +45,6 @@
#include <asm/dma.h>
#include <asm/smp.h>
#include "lmc_ver.h"
#include "lmc.h"
#include "lmc_var.h"
#include "lmc_debug.h"
......@@ -66,14 +64,6 @@
#define SPPP_attach(d) (void)0
#define SPPP_do_ioctl(d,i,c) -EOPNOTSUPP
#else
#if LINUX_VERSION_CODE < 0x20363
#define SPPP_attach(x) sppp_attach((struct ppp_device *)(x)->lmc_device)
#define SPPP_detach(x) sppp_detach((x)->lmc_device)
#define SPPP_open(x) sppp_open((x)->lmc_device)
#define SPPP_reopen(x) sppp_reopen((x)->lmc_device)
#define SPPP_close(x) sppp_close((x)->lmc_device)
#define SPPP_do_ioctl(x, y, z) sppp_do_ioctl((x)->lmc_device, (y), (z))
#else
#define SPPP_attach(x) sppp_attach((x)->pd)
#define SPPP_detach(x) sppp_detach((x)->pd->dev)
#define SPPP_open(x) sppp_open((x)->pd->dev)
......@@ -81,7 +71,6 @@
#define SPPP_close(x) sppp_close((x)->pd->dev)
#define SPPP_do_ioctl(x, y, z) sppp_do_ioctl((x)->pd->dev, (y), (z))
#endif
#endif
// init
void lmc_proto_init(lmc_softc_t *sc) /*FOLD00*/
......@@ -89,15 +78,12 @@ void lmc_proto_init(lmc_softc_t *sc) /*FOLD00*/
lmc_trace(sc->lmc_device, "lmc_proto_init in");
switch(sc->if_type){
case LMC_PPP:
#if LINUX_VERSION_CODE >= 0x20363
sc->pd = kmalloc(sizeof(struct ppp_device), GFP_KERNEL);
if (!sc->pd) {
printk("lmc_proto_init(): kmalloc failure!\n");
return;
}
sc->pd->dev = sc->lmc_device;
#endif
sc->if_ptr = sc->pd;
break;
case LMC_RAW:
......
......@@ -48,9 +48,6 @@ typedef struct lmc___ctl lmc_ctl_t;
#define u_int16_t u16
#define u_int8_t u8
#define tulip_uint32_t u32
#if LINUX_VERSION_CODE < 0x20155
#define u_int32_t u32
#endif
#define LMC_REG_RANGE 0x80
......@@ -410,9 +407,7 @@ struct lmc___softc {
u32 last_int;
u32 num_int;
#if LINUX_VERSION_CODE >= 0x20200
spinlock_t lmc_lock;
#endif
u_int16_t if_type; /* PPP or NET */
struct ppp_device *pd;
......@@ -550,10 +545,6 @@ struct lmc___softc {
#define LMC_CRC_LEN_16 2 /* 16-bit CRC */
#define LMC_CRC_LEN_32 4
#if LINUX_VERSION_CODE < 0x20100
#define test_and_set_bit(val, addr) set_bit(val, addr)
#endif
#ifdef LMC_HDLC
/* definition of an hdlc header. */
struct hdlc_hdr
......
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