X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fscsi%2Faacraid%2Fcomminit.c;h=89cc8b7b42a2028f515f5e3fbe150c621d311405;hb=44c3b59102e3ecc7a01e9811862633e670595e51;hp=df67ba686023d891a234c3ed9e577a632847e1db;hpb=cbe56159a3e60624b5f44cf48b640fa470436e34;p=linux-2.6-omap-h63xx.git diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c index df67ba68602..89cc8b7b42a 100644 --- a/drivers/scsi/aacraid/comminit.c +++ b/drivers/scsi/aacraid/comminit.c @@ -5,7 +5,7 @@ * based on the old aacraid driver that is.. * Adaptec aacraid device driver for Linux. * - * Copyright (c) 2000 Adaptec, Inc. (aacraid@adaptec.com) + * Copyright (c) 2000-2007 Adaptec, Inc. (aacraid@adaptec.com) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -111,7 +110,7 @@ static int aac_alloc_comm(struct aac_dev *dev, void **commaddr, unsigned long co /* * Align the beginning of Headers to commalign */ - align = (commalign - ((unsigned long)(base) & (commalign - 1))); + align = (commalign - ((uintptr_t)(base) & (commalign - 1))); base = base + align; phys = phys + align; /* @@ -302,10 +301,10 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev) if ((!aac_adapter_sync_cmd(dev, GET_ADAPTER_PROPERTIES, 0, 0, 0, 0, 0, 0, status+0, status+1, status+2, NULL, NULL)) && (status[0] == 0x00000001)) { - if (status[1] & AAC_OPT_NEW_COMM_64) + if (status[1] & le32_to_cpu(AAC_OPT_NEW_COMM_64)) dev->raw_io_64 = 1; if (dev->a_ops.adapter_comm && - (status[1] & AAC_OPT_NEW_COMM)) + (status[1] & le32_to_cpu(AAC_OPT_NEW_COMM))) dev->comm_interface = AAC_COMM_MESSAGE; if ((dev->comm_interface == AAC_COMM_MESSAGE) && (status[2] > dev->base_size)) { @@ -388,12 +387,11 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev) * Ok now init the communication subsystem */ - dev->queues = kmalloc(sizeof(struct aac_queue_block), GFP_KERNEL); + dev->queues = kzalloc(sizeof(struct aac_queue_block), GFP_KERNEL); if (dev->queues == NULL) { printk(KERN_ERR "Error could not allocate comm region.\n"); return NULL; } - memset(dev->queues, 0, sizeof(struct aac_queue_block)); if (aac_comm_init(dev)<0){ kfree(dev->queues);