From a4dde3abbf87a495154a876576e1ab34b17b5ef1 Mon Sep 17 00:00:00 2001 From: Michael Chan Date: Wed, 24 Feb 2010 14:42:08 +0000 Subject: cnic: Use union for the status blocks of different devices. We only need to assign the status block address once and it also saves space in the structure. Signed-off-by: Michael Chan Signed-off-by: Benjamin Li Signed-off-by: Eddie Wai Signed-off-by: David S. Miller --- drivers/net/cnic.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'drivers/net/cnic.h') diff --git a/drivers/net/cnic.h b/drivers/net/cnic.h index 1921597ab4a3..d566390b8c4d 100644 --- a/drivers/net/cnic.h +++ b/drivers/net/cnic.h @@ -224,9 +224,12 @@ struct cnic_local { u16 kcq_prod_idx; u32 kcq_io_addr; - void *status_blk; - struct status_block_msix *bnx2_status_blk; - struct host_status_block *bnx2x_status_blk; + union { + void *gen; + struct status_block_msix *bnx2; + struct host_status_block *bnx2x; + } status_blk; + struct host_def_status_block *bnx2x_def_status_blk; u32 status_blk_num; -- cgit v1.2.3