summaryrefslogtreecommitdiffstats
path: root/drivers/ap1000
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ap1000')
-rw-r--r--drivers/ap1000/bif.c2
-rw-r--r--drivers/ap1000/ddv.c12
-rw-r--r--drivers/ap1000/mac.c4
-rw-r--r--drivers/ap1000/ringbuf.c4
4 files changed, 14 insertions, 8 deletions
diff --git a/drivers/ap1000/bif.c b/drivers/ap1000/bif.c
index 45ae418f4..20c26ce58 100644
--- a/drivers/ap1000/bif.c
+++ b/drivers/ap1000/bif.c
@@ -242,7 +242,7 @@ int bif_rx(struct sk_buff *skb)
if (bif_device == NULL) {
printk("bif: bif_device is NULL in bif_rx\n");
- dev_kfree_skb(skb, FREE_WRITE);
+ dev_kfree_skb(skb);
return 0;
}
skb->dev = bif_device;
diff --git a/drivers/ap1000/ddv.c b/drivers/ap1000/ddv.c
index 186dfe10b..2348e21d7 100644
--- a/drivers/ap1000/ddv.c
+++ b/drivers/ap1000/ddv.c
@@ -14,7 +14,6 @@
*/
#include <linux/errno.h>
-#include <linux/config.h>
#include <linux/types.h>
#include <linux/fs.h>
#include <linux/ext2_fs.h>
@@ -985,9 +984,10 @@ static void ddv_geninit(struct gendisk *ignored)
int init_module(void)
{
int error = ddv_init();
- ddv_geninit(&(struct gendisk) { 0,0,0,0,0,0,0,0,0,0,0 });
- if (!error)
+ if (!error) {
+ ddv_geninit(&(struct gendisk) { 0,0,0,0,0,0,0,0,0,0,0 });
printk(KERN_INFO "DDV: Loaded as module.\n");
+ }
return error;
}
@@ -995,6 +995,7 @@ int init_module(void)
void cleanup_module(void)
{
int i;
+ struct gendisk ** gdp;
for (i = 0 ; i < NUM_DDVDEVS; i++)
invalidate_buffers(MKDEV(MAJOR_NR, i));
@@ -1004,6 +1005,11 @@ void cleanup_module(void)
OPT_IO(PRST) = PRST_IRST;
unregister_blkdev( MAJOR_NR, DEVICE_NAME );
+ for (gdp = &gendisk_head; *gdp; gdp = &((*gdp)->next))
+ if (*gdp == &ddv_gendisk)
+ break;
+ if (*gdp)
+ *gdp = (*gdp)->next;
free_irq(APOPT0_IRQ, NULL);
blk_dev[MAJOR_NR].request_fn = 0;
}
diff --git a/drivers/ap1000/mac.c b/drivers/ap1000/mac.c
index c17b4eec7..8e85ff555 100644
--- a/drivers/ap1000/mac.c
+++ b/drivers/ap1000/mac.c
@@ -803,7 +803,7 @@ void mac_process(void)
memcpy(msp->cur_mbuf.ptr - 3, el->skb->data,
ROUND4(el->skb->len));
mac_queue_frame((struct mac_buf *)&msp->cur_mbuf);
- dev_kfree_skb(el->skb, FREE_WRITE);
+ dev_kfree_skb(el->skb);
kfree_s(el, sizeof(*el));
continue;
}
@@ -1096,7 +1096,7 @@ void mac_dma_complete(void)
printk("mac_dma_complete(): Calling mac_queue_frame\n");
#endif
mac_queue_frame((struct mac_buf *)&msp->cur_mbuf);
- dev_kfree_skb(msp->cur_macq->skb, FREE_WRITE);
+ dev_kfree_skb(msp->cur_macq->skb);
kfree_s((struct mac_buf *)msp->cur_macq, sizeof(*(msp->cur_macq)));
msp->cur_macq = NULL;
#if MAC_DEBUG
diff --git a/drivers/ap1000/ringbuf.c b/drivers/ap1000/ringbuf.c
index ee33a03d4..905b8f069 100644
--- a/drivers/ap1000/ringbuf.c
+++ b/drivers/ap1000/ringbuf.c
@@ -49,7 +49,7 @@ void ap_ringbuf_init(void)
/* preallocate some ringbuffers */
for (i=0;i<RBUF_RESERVED;i++) {
- if (!(rb_ptr = (char *)__get_free_pages(GFP_ATOMIC,RBUF_RESERVED_ORDER,0))) {
+ if (!(rb_ptr = (char *)__get_free_pages(GFP_ATOMIC,RBUF_RESERVED_ORDER))) {
printk("failed to preallocate ringbuf %d\n",i);
return;
}
@@ -160,7 +160,7 @@ static int cap_map(int rb_size)
}
if (!rb_ptr) {
- rb_ptr = (char *)__get_free_pages(GFP_USER,order,0);
+ rb_ptr = (char *)__get_free_pages(GFP_USER,order);
if (!rb_ptr) return -ENOMEM;
for (i = MAP_NR(rb_ptr); i <= MAP_NR(rb_ptr+rb_size-1); i++) {