[Linux1394-cvslog] rev 727 - branches/linux-2.4
Brought to you by:
aeb,
bencollins
From: SVN U. <ben...@li...> - 2003-02-01 13:59:27
|
Author: bencollins Date: 2002-12-23 15:36:10 -0500 (Mon, 23 Dec 2002) New Revision: 727 Modified: branches/linux-2.4/eth1394.c branches/linux-2.4/eth1394.h branches/linux-2.4/hosts.c branches/linux-2.4/hosts.h branches/linux-2.4/ieee1394_core.c branches/linux-2.4/ieee1394_core.h branches/linux-2.4/ieee1394_types.h branches/linux-2.4/pcilynx.c branches/linux-2.4/raw1394.c branches/linux-2.4/raw1394.h branches/linux-2.4/sbp2.c branches/linux-2.4/sbp2.h Log: Remove some old compatiblity code. Modified: branches/linux-2.4/ieee1394_core.c ============================================================================== --- branches/linux-2.4/ieee1394_core.c (original) +++ branches/linux-2.4/ieee1394_core.c 2003-02-01 08:58:54.000000000 -0500 @@ -81,10 +81,10 @@ struct list_head *lh, *next; list_for_each_safe(lh, next, &packet->complete_tq) { - struct hpsb_queue_struct *tq = - list_entry(lh, struct hpsb_queue_struct, hpsb_queue_list); - list_del(&tq->hpsb_queue_list); - hpsb_schedule_work(tq); + struct tq_struct *tq = + list_entry(lh, struct tq_struct, list); + list_del(&tq->list); + schedule_task(tq); } return; @@ -93,11 +93,11 @@ /** * hpsb_add_packet_complete_task - add a new task for when a packet completes * @packet: the packet whose completion we want the task added to - * @tq: the hpsb_queue_struct describing the task to add + * @tq: the tq_struct describing the task to add */ -void hpsb_add_packet_complete_task(struct hpsb_packet *packet, struct hpsb_queue_struct *tq) +void hpsb_add_packet_complete_task(struct hpsb_packet *packet, struct tq_struct *tq) { - list_add_tail(&tq->hpsb_queue_list, &packet->complete_tq); + list_add_tail(&tq->list, &packet->complete_tq); return; } @@ -437,7 +437,7 @@ spin_unlock_irqrestore(&host->pending_pkt_lock, flags); up(&packet->state_change); - hpsb_schedule_work(&host->timeout_tq); + schedule_task(&host->timeout_tq); } /** @@ -881,7 +881,7 @@ } if (!list_empty(&host->pending_packets)) - hpsb_schedule_work(&host->timeout_tq); + schedule_task(&host->timeout_tq); spin_unlock_irqrestore(&host->pending_pkt_lock, flags); @@ -1030,7 +1030,7 @@ to get the index of the ieee1394_driver we want */ - blocknum = (minor(inode->i_rdev) >> 4) & 0xF; + blocknum = (MINOR(inode->i_rdev) >> 4) & 0xF; /* look up the driver */ Modified: branches/linux-2.4/ieee1394_core.h ============================================================================== --- branches/linux-2.4/ieee1394_core.h (original) +++ branches/linux-2.4/ieee1394_core.h 2003-02-01 08:58:54.000000000 -0500 @@ -77,7 +77,7 @@ }; /* add a new task for when a packet completes */ -void hpsb_add_packet_complete_task(struct hpsb_packet *packet, struct hpsb_queue_struct *tq); +void hpsb_add_packet_complete_task(struct hpsb_packet *packet, struct tq_struct *tq); static inline struct hpsb_packet *driver_packet(struct list_head *l) { @@ -194,7 +194,7 @@ /* return the index (within a minor number block) of a file */ static inline unsigned char ieee1394_file_to_instance(struct file *file) { - unsigned char minor = minor(file->f_dentry->d_inode->i_rdev); + unsigned char minor = MINOR(file->f_dentry->d_inode->i_rdev); /* return lower 4 bits */ return minor & 0xF; Modified: branches/linux-2.4/raw1394.c ============================================================================== --- branches/linux-2.4/raw1394.c (original) +++ branches/linux-2.4/raw1394.c 2003-02-01 08:58:54.000000000 -0500 @@ -107,7 +107,7 @@ if (req != NULL) { memset(req, 0, sizeof(struct pending_request)); INIT_LIST_HEAD(&req->list); - HPSB_INIT_WORK(&req->tq, (void(*)(void*))queue_complete_cb, NULL); + INIT_TQUEUE(&req->tq, (void(*)(void*))queue_complete_cb, NULL); } return req; @@ -797,7 +797,7 @@ return sizeof(struct raw1394_request); } - HPSB_PREPARE_WORK(&req->tq, (void (*)(void*))queue_complete_req, req); + PREPARE_TQUEUE(&req->tq, (void (*)(void*))queue_complete_req, req); req->req.length = 0; hpsb_add_packet_complete_task(packet, &req->tq); @@ -860,7 +860,7 @@ packet->header_size=header_length; packet->data_size=req->req.length-header_length; - HPSB_PREPARE_WORK(&req->tq, (void (*)(void*))queue_complete_req, req); + PREPARE_TQUEUE(&req->tq, (void (*)(void*))queue_complete_req, req); req->req.length = 0; hpsb_add_packet_complete_task(packet, &req->tq); Modified: branches/linux-2.4/raw1394.h ============================================================================== --- branches/linux-2.4/raw1394.h (original) +++ branches/linux-2.4/raw1394.h 2003-02-01 08:58:54.000000000 -0500 @@ -164,7 +164,7 @@ struct list_head list; struct file_info *file_info; struct hpsb_packet *packet; - struct hpsb_queue_struct tq; + struct tq_struct tq; struct iso_block_store *ibs; quadlet_t *data; int free_data; Modified: branches/linux-2.4/hosts.c ============================================================================== --- branches/linux-2.4/hosts.c (original) +++ branches/linux-2.4/hosts.c 2003-02-01 08:58:54.000000000 -0500 @@ -138,7 +138,7 @@ atomic_set(&h->generation, 0); - HPSB_INIT_WORK(&h->timeout_tq, (void (*)(void*))abort_timedouts, h); + INIT_TQUEUE(&h->timeout_tq, (void (*)(void*))abort_timedouts, h); h->topology_map = h->csr.topology_map + 3; h->speed_map = (u8 *)(h->csr.speed_map + 2); Modified: branches/linux-2.4/eth1394.c ============================================================================== --- branches/linux-2.4/eth1394.c (original) +++ branches/linux-2.4/eth1394.c 2003-02-01 08:58:54.000000000 -0500 @@ -682,8 +682,8 @@ ptask->skb = skb; ptask->addr = addr; ptask->dest_node = dest_node; - HPSB_INIT_WORK(&ptask->tq, hpsb_write_sched, ptask); - hpsb_schedule_work(&ptask->tq); + INIT_TQUEUE(&ptask->tq, hpsb_write_sched, ptask); + schedule_task(&ptask->tq); return 0; fail: Modified: branches/linux-2.4/hosts.h ============================================================================== --- branches/linux-2.4/hosts.h (original) +++ branches/linux-2.4/hosts.h 2003-02-01 08:58:54.000000000 -0500 @@ -3,6 +3,7 @@ #include <linux/wait.h> #include <linux/list.h> +#include <linux/tqueue.h> #include <asm/semaphore.h> #include "ieee1394_types.h" @@ -30,7 +31,7 @@ struct list_head pending_packets; spinlock_t pending_pkt_lock; - struct hpsb_queue_struct timeout_tq; + struct tq_struct timeout_tq; /* A bitmask where a set bit means that this tlabel is in use. * FIXME - should be handled per node instead of per bus. */ Modified: branches/linux-2.4/sbp2.c ============================================================================== --- branches/linux-2.4/sbp2.c (original) +++ branches/linux-2.4/sbp2.c 2003-02-01 08:58:54.000000000 -0500 @@ -801,7 +801,7 @@ * Set up a task queue completion routine, which returns * the packet to the free list and releases the tlabel. */ - HPSB_PREPARE_WORK(&request_packet->tq, + PREPARE_TQUEUE(&request_packet->tq, (void (*)(void*))sbp2util_free_request_packet, request_packet); request_packet->hi_context = hi; Modified: branches/linux-2.4/eth1394.h ============================================================================== --- branches/linux-2.4/eth1394.h (original) +++ branches/linux-2.4/eth1394.h 2003-02-01 08:58:54.000000000 -0500 @@ -56,7 +56,7 @@ struct sk_buff *skb; /* Socket buffer we are sending */ nodeid_t dest_node; /* Destination of the packet */ u64 addr; /* Address */ - struct hpsb_queue_struct tq; /* The task */ + struct tq_struct tq; /* The task */ }; /* IP1394 headers */ Modified: branches/linux-2.4/sbp2.h ============================================================================== --- branches/linux-2.4/sbp2.h (original) +++ branches/linux-2.4/sbp2.h 2003-02-01 08:58:54.000000000 -0500 @@ -319,7 +319,7 @@ struct list_head list; struct hpsb_packet *packet; - struct hpsb_queue_struct tq; + struct tq_struct tq; void *hi_context; }; Modified: branches/linux-2.4/ieee1394_types.h ============================================================================== --- branches/linux-2.4/ieee1394_types.h (original) +++ branches/linux-2.4/ieee1394_types.h 2003-02-01 08:58:54.000000000 -0500 @@ -10,27 +10,6 @@ #include <asm/byteorder.h> -/* The great kdev_t changeover in 2.5.x */ -#include <linux/kdev_t.h> -#ifndef minor -#define minor(dev) MINOR(dev) -#endif - -#ifndef __devexit_p -#define __devexit_p(x) x -#endif - -#include <linux/spinlock.h> - -#ifndef list_for_each_safe -#define list_for_each_safe(pos, n, head) \ - for (pos = (head)->next, n = pos->next; pos != (head); \ - pos = n, n = pos->next) - -#endif - -#define pte_offset_kernel pte_offset - #ifndef MIN #define MIN(a,b) ((a) < (b) ? (a) : (b)) #endif @@ -40,15 +19,6 @@ #endif -/* Use task queue */ -#include <linux/tqueue.h> -#define hpsb_queue_struct tq_struct -#define hpsb_queue_list list -#define hpsb_schedule_work(x) schedule_task(x) -#define HPSB_INIT_WORK(x,y,z) INIT_TQUEUE(x,y,z) -#define HPSB_PREPARE_WORK(x,y,z) PREPARE_TQUEUE(x,y,z) - - typedef u32 quadlet_t; typedef u64 octlet_t; typedef u16 nodeid_t; Modified: branches/linux-2.4/pcilynx.c ============================================================================== --- branches/linux-2.4/pcilynx.c (original) +++ branches/linux-2.4/pcilynx.c 2003-02-01 08:58:54.000000000 -0500 @@ -792,7 +792,7 @@ static int mem_open(struct inode *inode, struct file *file) { - int cid = minor(inode->i_rdev); + int cid = MINOR(inode->i_rdev); enum { t_rom, t_aux, t_ram } type; struct memdata *md; @@ -1817,7 +1817,7 @@ .name = PCILYNX_DRIVER_NAME, .id_table = pci_table, .probe = add_card, - .remove = __devexit_p(remove_card), + .remove = remove_card, }; static struct hpsb_host_driver lynx_driver = { |