]> err.no Git - linux-2.6/blobdiff - drivers/nubus/nubus.c
hamradio: remove unused variable
[linux-2.6] / drivers / nubus / nubus.c
index 14cbe34eb897d43a50aea55147dccd93332c2967..2f047e573d86cda7210d2346582324b5f126518e 100644 (file)
@@ -7,7 +7,6 @@
  *      and others.
  */
 
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
@@ -15,6 +14,7 @@
 #include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/delay.h>
+#include <linux/module.h>
 #include <asm/setup.h>
 #include <asm/system.h>
 #include <asm/page.h>
@@ -187,6 +187,7 @@ void nubus_get_rsrc_mem(void *dest, const struct nubus_dirent* dirent,
                len--;
        }
 }
+EXPORT_SYMBOL(nubus_get_rsrc_mem);
 
 void nubus_get_rsrc_str(void *dest, const struct nubus_dirent* dirent,
                        int len)
@@ -201,6 +202,7 @@ void nubus_get_rsrc_str(void *dest, const struct nubus_dirent* dirent,
                len--;
        }
 }
+EXPORT_SYMBOL(nubus_get_rsrc_str);
 
 int nubus_get_root_dir(const struct nubus_board* board,
                       struct nubus_dir* dir)
@@ -210,6 +212,7 @@ int nubus_get_root_dir(const struct nubus_board* board,
        dir->mask = board->lanes;
        return 0;
 }
+EXPORT_SYMBOL(nubus_get_root_dir);
 
 /* This is a slyly renamed version of the above */
 int nubus_get_func_dir(const struct nubus_dev* dev,
@@ -220,6 +223,7 @@ int nubus_get_func_dir(const struct nubus_dev* dev,
        dir->mask = dev->board->lanes;
        return 0;
 }
+EXPORT_SYMBOL(nubus_get_func_dir);
 
 int nubus_get_board_dir(const struct nubus_board* board,
                        struct nubus_dir* dir)
@@ -238,6 +242,7 @@ int nubus_get_board_dir(const struct nubus_board* board,
                return -1;
        return 0;
 }
+EXPORT_SYMBOL(nubus_get_board_dir);
 
 int nubus_get_subdir(const struct nubus_dirent *ent,
                     struct nubus_dir *dir)
@@ -247,6 +252,7 @@ int nubus_get_subdir(const struct nubus_dirent *ent,
        dir->mask = ent->mask;
        return 0;
 }
+EXPORT_SYMBOL(nubus_get_subdir);
 
 int nubus_readdir(struct nubus_dir *nd, struct nubus_dirent *ent)
 {
@@ -275,12 +281,14 @@ int nubus_readdir(struct nubus_dir *nd, struct nubus_dirent *ent)
        ent->mask  = nd->mask;
        return 0;
 }
+EXPORT_SYMBOL(nubus_readdir);
 
 int nubus_rewinddir(struct nubus_dir* dir)
 {
        dir->ptr = dir->base;
        return 0;
 }
+EXPORT_SYMBOL(nubus_rewinddir);
 
 /* Driver interface functions, more or less like in pci.c */
 
@@ -304,6 +312,7 @@ nubus_find_device(unsigned short category,
        }
        return NULL;
 }
+EXPORT_SYMBOL(nubus_find_device);
 
 struct nubus_dev*
 nubus_find_type(unsigned short category,
@@ -321,6 +330,7 @@ nubus_find_type(unsigned short category,
        }
        return NULL;
 }
+EXPORT_SYMBOL(nubus_find_type);
 
 struct nubus_dev*
 nubus_find_slot(unsigned int slot,
@@ -336,6 +346,7 @@ nubus_find_slot(unsigned int slot,
        }
        return NULL;
 }
+EXPORT_SYMBOL(nubus_find_slot);
 
 int
 nubus_find_rsrc(struct nubus_dir* dir, unsigned char rsrc_type,
@@ -347,13 +358,14 @@ nubus_find_rsrc(struct nubus_dir* dir, unsigned char rsrc_type,
        }       
        return -1;
 }
+EXPORT_SYMBOL(nubus_find_rsrc);
 
 /* Initialization functions - decide which slots contain stuff worth
    looking at, and print out lots and lots of information from the
    resource blocks. */
 
 /* FIXME: A lot of this stuff will eventually be useful after
-   initializaton, for intelligently probing Ethernet and video chips,
+   initialization, for intelligently probing Ethernet and video chips,
    among other things.  The rest of it should go in the /proc code.
    For now, we just use it to give verbose boot logs. */
 
@@ -467,9 +479,8 @@ static struct nubus_dev* __init
                       parent->base, dir.base);
 
        /* Actually we should probably panic if this fails */
-       if ((dev = kmalloc(sizeof(*dev), GFP_ATOMIC)) == NULL)
+       if ((dev = kzalloc(sizeof(*dev), GFP_ATOMIC)) == NULL)
                return NULL;    
-       memset(dev, 0, sizeof(*dev));
        dev->resid = parent->type;
        dev->directory = dir.base;
        dev->board = board;
@@ -801,9 +812,8 @@ static struct nubus_board* __init nubus_add_board(int slot, int bytelanes)
        nubus_rewind(&rp, FORMAT_BLOCK_SIZE, bytelanes);
 
        /* Actually we should probably panic if this fails */
-       if ((board = kmalloc(sizeof(*board), GFP_ATOMIC)) == NULL)
+       if ((board = kzalloc(sizeof(*board), GFP_ATOMIC)) == NULL)
                return NULL;    
-       memset(board, 0, sizeof(*board));
        board->fblock = rp;
 
        /* Dump the format block for debugging purposes */