X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Ffc4%2Fsocal.c;h=922e9613b2cf547fe6c708d2c5a7aab4af1d33fc;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=5ee4dda537431635cdeddbc9bd2751b71af54717;hpb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;p=linux-2.6.git diff --git a/drivers/fc4/socal.c b/drivers/fc4/socal.c index 5ee4dda53..922e9613b 100644 --- a/drivers/fc4/socal.c +++ b/drivers/fc4/socal.c @@ -27,8 +27,8 @@ static char *version = #include #include #include +#include #include -#include #include #include #include @@ -665,9 +665,8 @@ static inline void socal_init(struct sbus_dev *sdev, int no) int size, i; int irq, node; - s = kmalloc (sizeof (struct socal), GFP_KERNEL); + s = kzalloc (sizeof (struct socal), GFP_KERNEL); if (!s) return; - memset (s, 0, sizeof(struct socal)); spin_lock_init(&s->lock); s->socal_no = no; @@ -800,11 +799,11 @@ static inline void socal_init(struct sbus_dev *sdev, int no) s->rsp[1].pool = s->rsp[0].pool + SOCAL_CQ_RSP0_SIZE; s->rsp[2].pool = s->rsp[1].pool + SOCAL_CQ_RSP1_SIZE; - s->req[0].hw_cq = (socal_hw_cq *)(s->xram + SOCAL_CQ_REQ_OFFSET); - s->req[1].hw_cq = (socal_hw_cq *)(s->xram + SOCAL_CQ_REQ_OFFSET + sizeof(socal_hw_cq)); - s->rsp[0].hw_cq = (socal_hw_cq *)(s->xram + SOCAL_CQ_RSP_OFFSET); - s->rsp[1].hw_cq = (socal_hw_cq *)(s->xram + SOCAL_CQ_RSP_OFFSET + sizeof(socal_hw_cq)); - s->rsp[2].hw_cq = (socal_hw_cq *)(s->xram + SOCAL_CQ_RSP_OFFSET + 2 * sizeof(socal_hw_cq)); + s->req[0].hw_cq = (socal_hw_cq __iomem *)(s->xram + SOCAL_CQ_REQ_OFFSET); + s->req[1].hw_cq = (socal_hw_cq __iomem *)(s->xram + SOCAL_CQ_REQ_OFFSET + sizeof(socal_hw_cq)); + s->rsp[0].hw_cq = (socal_hw_cq __iomem *)(s->xram + SOCAL_CQ_RSP_OFFSET); + s->rsp[1].hw_cq = (socal_hw_cq __iomem *)(s->xram + SOCAL_CQ_RSP_OFFSET + sizeof(socal_hw_cq)); + s->rsp[2].hw_cq = (socal_hw_cq __iomem *)(s->xram + SOCAL_CQ_RSP_OFFSET + 2 * sizeof(socal_hw_cq)); cq[1].address = cq[0].address + (SOCAL_CQ_REQ0_SIZE * sizeof(socal_req)); cq[4].address = cq[1].address + (SOCAL_CQ_REQ1_SIZE * sizeof(socal_req));