Skip to contentSkip to conversation

iphase: move suni_priv to suni.h

PATCH In review Jorge Boncompte [DTI2] 2 participants 2 messages Jun 5, 2008 – Jun 14, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iphase: move suni_priv to suni.h

---
 drivers/atm/iphase.c |    6 ------
 drivers/atm/suni.c   |    8 --------
 drivers/atm/suni.h   |    9 +++++++++
 3 files changed, 9 insertions(+), 14 deletions(-)
drivers/atm/iphase.c +0 -6
index 92fce28..1b7090a 100644
@@ -65,12 +65,6 @@
 #include "iphase.h"		
 #include "suni.h"		
 #define swap(x) (((x & 0xff) << 8) | ((x & 0xff00) >> 8))
-struct suni_priv {
-        struct k_sonet_stats sonet_stats; /* link diagnostics */
-        unsigned char loop_mode;        /* loopback mode */
-        struct atm_dev *dev;            /* device back-pointer */
-        struct suni_priv *next;         /* next SUNI */
-};
 #define PRIV(dev) ((struct suni_priv *) dev->phy_data)
 
 static unsigned char ia_phy_get(struct atm_dev *dev, unsigned long addr);
drivers/atm/suni.c +0 -8
index b1d063c..6de0856 100644
@@ -30,14 +30,6 @@
 #endif
 
 
-struct suni_priv {
-	struct k_sonet_stats sonet_stats; /* link diagnostics */
-	int loop_mode;			/* loopback mode */
-	struct atm_dev *dev;		/* device back-pointer */
-	struct suni_priv *next;		/* next SUNI */
-};
-
-
 #define PRIV(dev) ((struct suni_priv *) dev->phy_data)
 
 #define PUT(val,reg) dev->ops->phy_put(dev,val,SUNI_##reg)
drivers/atm/suni.h +9 -0
index d14c835..de145ff 100644
@@ -8,6 +8,15 @@
 
 #include <linux/atmdev.h>
 #include <linux/atmioc.h>
+#include <linux/sonet.h>
+
+
+struct suni_priv {
+	struct k_sonet_stats sonet_stats; /* link diagnostics */
+	int loop_mode;			/* loopback mode */
+	struct atm_dev *dev;		/* device back-pointer */
+	struct suni_priv *next;		/* next SUNI */
+};
 
 
 /* SUNI registers */
#1 lore raw
Quoted 2 lines · In message <[email protected]>,"Jorge Boncompte [DTI2]" writes:

i am not thrilled about iphase digging at the internals of the suni module, but i would prefer not to have a duplicate struct. i will submit this with the next batch of atm patches. btw, i moved the struct suni_priv inside the #ifdef KERNEL since userspace cant make any use of the struct.