Commit 460f573a authored by Adrian Bunk's avatar Adrian Bunk Committed by Linus Torvalds

[PATCH] small drivers/atm/* cleanup

The patch below does the following:
- remove #if'd kernel 2.2 code
- changes one MIN to min
parent f04329ac
...@@ -2874,11 +2874,7 @@ static int __init hrz_probe (void) { ...@@ -2874,11 +2874,7 @@ static int __init hrz_probe (void) {
// writes to adapter memory (handles IRQ and SMP) // writes to adapter memory (handles IRQ and SMP)
spin_lock_init (&dev->mem_lock); spin_lock_init (&dev->mem_lock);
#if LINUX_VERSION_CODE >= 0x20303
init_waitqueue_head (&dev->tx_queue); init_waitqueue_head (&dev->tx_queue);
#else
dev->tx_queue = 0;
#endif
// vpi in 0..4, vci in 6..10 // vpi in 0..4, vci in 6..10
dev->atm_dev->ci_range.vpi_bits = vpi_bits; dev->atm_dev->ci_range.vpi_bits = vpi_bits;
......
...@@ -422,11 +422,7 @@ struct hrz_dev { ...@@ -422,11 +422,7 @@ struct hrz_dev {
unsigned int tx_regions; // number of remaining regions unsigned int tx_regions; // number of remaining regions
spinlock_t mem_lock; spinlock_t mem_lock;
#if LINUX_VERSION_CODE >= 0x20303
wait_queue_head_t tx_queue; wait_queue_head_t tx_queue;
#else
struct wait_queue * tx_queue;
#endif
u8 irq; u8 irq;
long flags; long flags;
......
...@@ -436,7 +436,7 @@ ia_open_abr_vc(IADEV *dev, srv_cls_param_t *srv_p, ...@@ -436,7 +436,7 @@ ia_open_abr_vc(IADEV *dev, srv_cls_param_t *srv_p,
if (crm == 0) crm = 1; if (crm == 0) crm = 1;
f_abr_vc->f_crm = crm & 0xff; f_abr_vc->f_crm = crm & 0xff;
f_abr_vc->f_pcr = cellrate_to_float(srv_p->pcr); f_abr_vc->f_pcr = cellrate_to_float(srv_p->pcr);
icr = MIN( srv_p->icr, (srv_p->tbe > srv_p->frtt) ? icr = min( srv_p->icr, (srv_p->tbe > srv_p->frtt) ?
((srv_p->tbe/srv_p->frtt)*1000000) : ((srv_p->tbe/srv_p->frtt)*1000000) :
(1000000/(srv_p->frtt/srv_p->tbe))); (1000000/(srv_p->frtt/srv_p->tbe)));
f_abr_vc->f_icr = cellrate_to_float(icr); f_abr_vc->f_icr = cellrate_to_float(icr);
......
...@@ -808,7 +808,6 @@ typedef struct { ...@@ -808,7 +808,6 @@ typedef struct {
} r_vc_abr_entry; } r_vc_abr_entry;
#define MRM 3 #define MRM 3
#define MIN(x,y) ((x) < (y)) ? (x) : (y)
typedef struct srv_cls_param { typedef struct srv_cls_param {
u32 class_type; /* CBR/VBR/ABR/UBR; use the enum above */ u32 class_type; /* CBR/VBR/ABR/UBR; use the enum above */
...@@ -1017,13 +1016,8 @@ typedef struct iadev_t { ...@@ -1017,13 +1016,8 @@ typedef struct iadev_t {
spinlock_t tx_lock; spinlock_t tx_lock;
IARTN_Q tx_return_q; IARTN_Q tx_return_q;
u32 close_pending; u32 close_pending;
#if LINUX_VERSION_CODE >= 0x20303
wait_queue_head_t close_wait; wait_queue_head_t close_wait;
wait_queue_head_t timeout_wait; wait_queue_head_t timeout_wait;
#else
struct wait_queue *close_wait;
struct wait_queue *timeout_wait;
#endif
struct cpcs_trailer_desc *tx_buf; struct cpcs_trailer_desc *tx_buf;
u16 num_tx_desc, tx_buf_sz, rate_limit; u16 num_tx_desc, tx_buf_sz, rate_limit;
u32 tx_cell_cnt, tx_pkt_cnt; u32 tx_cell_cnt, tx_pkt_cnt;
......
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