iphase: move suni_priv to suni.h
Subsystems (3)
PATCH 1/1 iphase: move suni_priv to suni.h
Signed-off-by Jorge Boncompte [DTI2] <[email protected]>
--- 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
@@ -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
@@ -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
@@ -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 */
Quoted 2 lines · In message <[email protected]>,"Jorge Boncompte [DTI2]" writes:
Signed-off-by Jorge Boncompte [DTI2] <[email protected]>
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.