[PATCH 207/368] Staging: et131x: Kill off the TXMAC_ERR_t type

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Greg KH
Date: Thursday, March 4, 2010 - 1:06 pm

From: Alan Cox <alan@linux.intel.com>

This is another one we don't really need to do much to get rid of

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/staging/et131x/et1310_address_map.h |   38 ++++++++-------------------
 drivers/staging/et131x/et131x_isr.c         |    2 +-
 2 files changed, 12 insertions(+), 28 deletions(-)

diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h
index c8b22ba..4c1e735 100644
--- a/drivers/staging/et131x/et1310_address_map.h
+++ b/drivers/staging/et131x/et1310_address_map.h
@@ -597,33 +597,17 @@ struct rxdma_regs {					/* Location: */
 /*
  * structure for error reg in txmac address map
  * located at address 0x3018
+ *
+ * 31-9: unused
+ * 8: fifo_underrun
+ * 7-6: unused
+ * 5: ctrl2_err
+ * 4: txq_underrun
+ * 3: bcnt_err
+ * 2: lseg_err
+ * 1: segnum_err
+ * 0: seg0_err
  */
-typedef union _TXMAC_ERR_t {
-	u32 value;
-	struct {
-#ifdef _BIT_FIELDS_HTOL
-		u32 unused2:23;		/* bits 9-31 */
-		u32 fifo_underrun:1;	/* bit 8 */
-		u32 unused1:2;		/* bits 6-7 */
-		u32 ctrl2_err:1;	/* bit 5 */
-		u32 txq_underrun:1;	/* bit 4 */
-		u32 bcnt_err:1;		/* bit 3 */
-		u32 lseg_err:1;		/* bit 2 */
-		u32 segnum_err:1;	/* bit 1 */
-		u32 seg0_err:1;		/* bit 0 */
-#else
-		u32 seg0_err:1;		/* bit 0 */
-		u32 segnum_err:1;	/* bit 1 */
-		u32 lseg_err:1;		/* bit 2 */
-		u32 bcnt_err:1;		/* bit 3 */
-		u32 txq_underrun:1;	/* bit 4 */
-		u32 ctrl2_err:1;	/* bit 5 */
-		u32 unused1:2;		/* bits 6-7 */
-		u32 fifo_underrun:1;	/* bit 8 */
-		u32 unused2:23;		/* bits 9-31 */
-#endif
-	} bits;
-} TXMAC_ERR_t, *PTXMAC_ERR_t;
 
 /*
  * structure for error interrupt reg in txmac address map
@@ -675,7 +659,7 @@ typedef struct _TXMAC_t {		/* Location: */
 	u32 max_fill;			/*  0x300C */
 	u32 cf_param;			/*  0x3010 */
 	u32 tx_test;			/*  0x3014 */
-	TXMAC_ERR_t err;		/*  0x3018 */
+	u32 err;			/*  0x3018 */
 	TXMAC_ERR_INT_t err_int;	/*  0x301C */
 	u32 bp_ctrl;			/*  0x3020 */
 } TXMAC_t, *PTXMAC_t;
diff --git a/drivers/staging/et131x/et131x_isr.c b/drivers/staging/et131x/et131x_isr.c
index c35a564..aa36e40 100644
--- a/drivers/staging/et131x/et131x_isr.c
+++ b/drivers/staging/et131x/et131x_isr.c
@@ -406,7 +406,7 @@ void et131x_isr_handler(struct work_struct *work)
 
 		/* Let's move on to the TxMac */
 		if (status & ET_INTR_TXMAC) {
-			u32 err = readl(&iomem->txmac.err.value);
+			u32 err = readl(&iomem->txmac.err);
 
 			/*
 			 * When any of the errors occur and TXMAC generates
-- 
1.7.0.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 043/368] Staging: add dt3155 driver, Greg KH, (Thu Mar 4, 1:03 pm)
[PATCH 045/368] Staging: dt3155: add TODO file, Greg KH, (Thu Mar 4, 1:03 pm)
[GIT PATCH] STAGING patches for 2.6.33-git, Greg KH, (Thu Mar 4, 1:04 pm)
[PATCH 190/368] Staging: et131x: kill EXP_ROM, Greg KH, (Thu Mar 4, 1:06 pm)
[PATCH 207/368] Staging: et131x: Kill off the TXMAC_ERR_t type, Greg KH, (Thu Mar 4, 1:06 pm)
[PATCH 222/368] Staging: otus: fix memory leak, Greg KH, (Thu Mar 4, 1:06 pm)
[PATCH 264/368] staging: dream: Codestyle fix, Greg KH, (Thu Mar 4, 1:07 pm)
Re: [PATCH 264/368] staging: dream: Codestyle fix, Pavel Machek, (Fri Mar 5, 12:08 am)