[S390] EX_TABLE macro.
[powerpc.git] / drivers / s390 / crypto / z90main.c
index 2f54d03..b2f20ab 100644 (file)
@@ -1,9 +1,9 @@
 /*
  *  linux/drivers/s390/crypto/z90main.c
  *
- *  z90crypt 1.3.2
+ *  z90crypt 1.3.3
  *
- *  Copyright (C)  2001, 2004 IBM Corporation
+ *  Copyright (C)  2001, 2005 IBM Corporation
  *  Author(s): Robert Burroughs (burrough@us.ibm.com)
  *             Eric Rossman (edrossma@us.ibm.com)
  *
 #include "z90crypt.h"
 #include "z90common.h"
 
-#define VERSION_Z90MAIN_C "$Revision: 1.62 $"
-
-static char z90main_version[] __initdata =
-       "z90main.o (" VERSION_Z90MAIN_C "/"
-                      VERSION_Z90COMMON_H "/" VERSION_Z90CRYPT_H ")";
-
-extern char z90hardware_version[];
-
 /**
  * Defaults that may be modified.
  */
@@ -419,7 +411,6 @@ static struct miscdevice z90crypt_misc_device = {
        .minor      = Z90CRYPT_MINOR,
        .name       = DEV_NAME,
        .fops       = &z90crypt_fops,
-       .devfs_name = DEV_NAME
 };
 
 /**
@@ -594,8 +585,6 @@ z90crypt_init_module(void)
                PRINTKN("Version %d.%d.%d loaded, built on %s %s\n",
                        z90crypt_VERSION, z90crypt_RELEASE, z90crypt_VARIANT,
                        __DATE__, __TIME__);
-               PRINTKN("%s\n", z90main_version);
-               PRINTKN("%s\n", z90hardware_version);
                PDEBUG("create_z90crypt (domain index %d) successful.\n",
                       domain);
        } else
@@ -717,13 +706,12 @@ z90crypt_open(struct inode *inode, struct file *filp)
        if (quiesce_z90crypt)
                return -EQUIESCE;
 
-       private_data_p = kmalloc(sizeof(struct priv_data), GFP_KERNEL);
+       private_data_p = kzalloc(sizeof(struct priv_data), GFP_KERNEL);
        if (!private_data_p) {
                PRINTK("Memory allocate failed\n");
                return -ENOMEM;
        }
 
-       memset((void *)private_data_p, 0, sizeof(struct priv_data));
        private_data_p->status = STAT_OPEN;
        private_data_p->opener_pid = PID();
        filp->private_data = private_data_p;
@@ -1001,6 +989,7 @@ remove_device(struct device *device_p)
  * PCIXCC_MCL2   512-2048     ----- (applying any GA LIC will make an MCL3 card)
  * PCIXCC_MCL3   -----        128-2048
  * CEX2C         512-2048     128-2048
+ * CEX2A          ??-2048     same (the lower limit is less than 128 bit...)
  *
  * ext_bitlens (extended bitlengths) is a global, since you should not apply an
  * MCL to just one card in a machine. We assume, at first, that all cards have
@@ -2746,13 +2735,11 @@ create_z90crypt(int *cdx_p)
        z90crypt.max_count = Z90CRYPT_NUM_DEVS;
        z90crypt.cdx = *cdx_p;
 
-       hdware_blk_p = (struct hdware_block *)
-               kmalloc(sizeof(struct hdware_block), GFP_ATOMIC);
+       hdware_blk_p = kzalloc(sizeof(struct hdware_block), GFP_ATOMIC);
        if (!hdware_blk_p) {
                PDEBUG("kmalloc for hardware block failed\n");
                return ENOMEM;
        }
-       memset(hdware_blk_p, 0x00, sizeof(struct hdware_block));
        z90crypt.hdware_info = hdware_blk_p;
 
        return 0;
@@ -2987,12 +2974,11 @@ create_crypto_device(int index)
                total_size = sizeof(struct device) +
                             z90crypt.q_depth_array[index] * sizeof(int);
 
-               dev_ptr = (struct device *) kmalloc(total_size, GFP_ATOMIC);
+               dev_ptr = kzalloc(total_size, GFP_ATOMIC);
                if (!dev_ptr) {
                        PRINTK("kmalloc device %d failed\n", index);
                        return ENOMEM;
                }
-               memset(dev_ptr, 0, total_size);
                dev_ptr->dev_resp_p = kmalloc(MAX_RESPONSE_SIZE, GFP_ATOMIC);
                if (!dev_ptr->dev_resp_p) {
                        kfree(dev_ptr);