linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / s390 / crypto / z90main.c
index b2f20ab..7d6f190 100644 (file)
@@ -1,9 +1,9 @@
 /*
  *  linux/drivers/s390/crypto/z90main.c
  *
- *  z90crypt 1.3.3
+ *  z90crypt 1.3.2
  *
- *  Copyright (C)  2001, 2005 IBM Corporation
+ *  Copyright (C)  2001, 2004 IBM Corporation
  *  Author(s): Robert Burroughs (burrough@us.ibm.com)
  *             Eric Rossman (edrossma@us.ibm.com)
  *
@@ -411,6 +411,7 @@ static struct miscdevice z90crypt_misc_device = {
        .minor      = Z90CRYPT_MINOR,
        .name       = DEV_NAME,
        .fops       = &z90crypt_fops,
+       .devfs_name = DEV_NAME
 };
 
 /**
@@ -706,12 +707,13 @@ z90crypt_open(struct inode *inode, struct file *filp)
        if (quiesce_z90crypt)
                return -EQUIESCE;
 
-       private_data_p = kzalloc(sizeof(struct priv_data), GFP_KERNEL);
+       private_data_p = kmalloc(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;
@@ -989,7 +991,6 @@ 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
@@ -2735,11 +2736,13 @@ create_z90crypt(int *cdx_p)
        z90crypt.max_count = Z90CRYPT_NUM_DEVS;
        z90crypt.cdx = *cdx_p;
 
-       hdware_blk_p = kzalloc(sizeof(struct hdware_block), GFP_ATOMIC);
+       hdware_blk_p = (struct hdware_block *)
+               kmalloc(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;
@@ -2974,11 +2977,12 @@ create_crypto_device(int index)
                total_size = sizeof(struct device) +
                             z90crypt.q_depth_array[index] * sizeof(int);
 
-               dev_ptr = kzalloc(total_size, GFP_ATOMIC);
+               dev_ptr = (struct device *) kmalloc(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);