From d9aa82b025040f7923cb70fd604c6aed6c2c0771 Mon Sep 17 00:00:00 2001 From: Oron Peled Date: Mon, 16 Nov 2015 15:42:21 -0500 Subject: [PATCH] xpp: rename xpd->type to xpd->xpd_type Signed-off-by: Tzafrir Cohen --- drivers/dahdi/xpp/card_bri.c | 6 +++--- drivers/dahdi/xpp/card_echo.c | 8 ++++---- drivers/dahdi/xpp/card_fxo.c | 6 +++--- drivers/dahdi/xpp/card_fxs.c | 6 +++--- drivers/dahdi/xpp/card_global.c | 6 +++--- drivers/dahdi/xpp/card_pri.c | 8 ++++---- drivers/dahdi/xpp/xbus-sysfs.c | 12 ++++++------ drivers/dahdi/xpp/xpd.h | 6 +++--- drivers/dahdi/xpp/xpp_dahdi.c | 8 ++++---- drivers/dahdi/xpp/xproto.c | 10 +++++----- 10 files changed, 38 insertions(+), 38 deletions(-) diff --git a/drivers/dahdi/xpp/card_bri.c b/drivers/dahdi/xpp/card_bri.c index 7ccbc55..5476281 100644 --- a/drivers/dahdi/xpp/card_bri.c +++ b/drivers/dahdi/xpp/card_bri.c @@ -1744,9 +1744,9 @@ static int bri_xpd_probe(struct device *dev) xpd = dev_to_xpd(dev); /* Is it our device? */ - if (xpd->type != XPD_TYPE_BRI) { + if (xpd->xpd_type != XPD_TYPE_BRI) { XPD_ERR(xpd, "drop suggestion for %s (%d)\n", dev_name(dev), - xpd->type); + xpd->xpd_type); return -EINVAL; } XPD_DBG(DEVICES, xpd, "SYSFS\n"); @@ -1763,7 +1763,7 @@ static int bri_xpd_remove(struct device *dev) } static struct xpd_driver bri_driver = { - .type = XPD_TYPE_BRI, + .xpd_type = XPD_TYPE_BRI, .driver = { .name = "bri", .owner = THIS_MODULE, diff --git a/drivers/dahdi/xpp/card_echo.c b/drivers/dahdi/xpp/card_echo.c index 91cb84e..c6e6046 100644 --- a/drivers/dahdi/xpp/card_echo.c +++ b/drivers/dahdi/xpp/card_echo.c @@ -80,7 +80,7 @@ static int ECHO_card_init(xbus_t *xbus, xpd_t *xpd) BUG_ON(!xpd); XPD_DBG(GENERAL, xpd, "\n"); - xpd->type = XPD_TYPE_ECHO; + xpd->xpd_type = XPD_TYPE_ECHO; XPD_DBG(DEVICES, xpd, "%s\n", xpd->type_name); ret = CALL_EC_METHOD(ec_update, xbus, xbus); return ret; @@ -307,9 +307,9 @@ static int echo_xpd_probe(struct device *dev) ec_xpd = dev_to_xpd(dev); /* Is it our device? */ - if (ec_xpd->type != XPD_TYPE_ECHO) { + if (ec_xpd->xpd_type != XPD_TYPE_ECHO) { XPD_ERR(ec_xpd, "drop suggestion for %s (%d)\n", dev_name(dev), - ec_xpd->type); + ec_xpd->xpd_type); return -EINVAL; } XPD_DBG(DEVICES, ec_xpd, "SYSFS\n"); @@ -326,7 +326,7 @@ static int echo_xpd_remove(struct device *dev) } static struct xpd_driver echo_driver = { - .type = XPD_TYPE_ECHO, + .xpd_type = XPD_TYPE_ECHO, .driver = { .name = "echo", .owner = THIS_MODULE, diff --git a/drivers/dahdi/xpp/card_fxo.c b/drivers/dahdi/xpp/card_fxo.c index 58e244d..4b8697f 100644 --- a/drivers/dahdi/xpp/card_fxo.c +++ b/drivers/dahdi/xpp/card_fxo.c @@ -1552,9 +1552,9 @@ static int fxo_xpd_probe(struct device *dev) xpd = dev_to_xpd(dev); /* Is it our device? */ - if (xpd->type != XPD_TYPE_FXO) { + if (xpd->xpd_type != XPD_TYPE_FXO) { XPD_ERR(xpd, "drop suggestion for %s (%d)\n", dev_name(dev), - xpd->type); + xpd->xpd_type); return -EINVAL; } XPD_DBG(DEVICES, xpd, "SYSFS\n"); @@ -1580,7 +1580,7 @@ static int fxo_xpd_remove(struct device *dev) } static struct xpd_driver fxo_driver = { - .type = XPD_TYPE_FXO, + .xpd_type = XPD_TYPE_FXO, .driver = { .name = "fxo", .owner = THIS_MODULE, diff --git a/drivers/dahdi/xpp/card_fxs.c b/drivers/dahdi/xpp/card_fxs.c index 86ea039..b403b2a 100644 --- a/drivers/dahdi/xpp/card_fxs.c +++ b/drivers/dahdi/xpp/card_fxs.c @@ -1991,9 +1991,9 @@ static int fxs_xpd_probe(struct device *dev) xpd = dev_to_xpd(dev); /* Is it our device? */ - if (xpd->type != XPD_TYPE_FXS) { + if (xpd->xpd_type != XPD_TYPE_FXS) { XPD_ERR(xpd, "drop suggestion for %s (%d)\n", dev_name(dev), - xpd->type); + xpd->xpd_type); return -EINVAL; } XPD_DBG(DEVICES, xpd, "SYSFS\n"); @@ -2019,7 +2019,7 @@ static int fxs_xpd_remove(struct device *dev) } static struct xpd_driver fxs_driver = { - .type = XPD_TYPE_FXS, + .xpd_type = XPD_TYPE_FXS, .driver = { .name = "fxs", .owner = THIS_MODULE, diff --git a/drivers/dahdi/xpp/card_global.c b/drivers/dahdi/xpp/card_global.c index f743e62..b4c44af 100644 --- a/drivers/dahdi/xpp/card_global.c +++ b/drivers/dahdi/xpp/card_global.c @@ -753,7 +753,7 @@ int run_initialize_registers(xpd_t *xpd) snprintf(modelstr, MAX_ENV_STR, "XBUS_MODEL_STRING=%s", xbus->transport.model_string); snprintf(unitstr, MAX_ENV_STR, "UNIT_NUMBER=%d", xpd->addr.unit); - snprintf(typestr, MAX_ENV_STR, "UNIT_TYPE=%d", xpd->type); + snprintf(typestr, MAX_ENV_STR, "UNIT_TYPE=%d", xpd->xpd_type); snprintf(subunitsstr, MAX_ENV_STR, "UNIT_SUBUNITS=%d", xpd->subunits); snprintf(directionstr, MAX_ENV_STR, "UNIT_SUBUNITS_DIR=%d", direction_mask); @@ -762,7 +762,7 @@ int run_initialize_registers(xpd_t *xpd) xbus->connector); snprintf(xbuslabel, MAX_ENV_STR, "XBUS_LABEL=%s", xbus->label); if (snprintf - (init_card, MAX_PATH_STR, "%s/init_card_%d_%d", initdir, xpd->type, + (init_card, MAX_PATH_STR, "%s/init_card_%d_%d", initdir, xpd->xpd_type, xbus->revision) > MAX_PATH_STR) { XPD_NOTICE(xpd, "Cannot initialize. pathname is longer " @@ -779,7 +779,7 @@ int run_initialize_registers(xpd_t *xpd) goto err; } XPD_DBG(DEVICES, xpd, "running '%s' for type=%d revision=%d\n", - init_card, xpd->type, xbus->revision); + init_card, xpd->xpd_type, xbus->revision); ret = call_usermodehelper(init_card, argv, envp, UMH_WAIT_PROC); /* * Carefully report results diff --git a/drivers/dahdi/xpp/card_pri.c b/drivers/dahdi/xpp/card_pri.c index c037c7f..96f1989 100644 --- a/drivers/dahdi/xpp/card_pri.c +++ b/drivers/dahdi/xpp/card_pri.c @@ -1287,7 +1287,7 @@ static int PRI_card_init(xbus_t *xbus, xpd_t *xpd) BUG_ON(!xpd); XPD_DBG(GENERAL, xpd, "\n"); - xpd->type = XPD_TYPE_PRI; + xpd->xpd_type = XPD_TYPE_PRI; priv = xpd->priv; if (priv->pri_protocol == PRI_PROTO_0) { /* @@ -2635,9 +2635,9 @@ static int pri_xpd_probe(struct device *dev) xpd = dev_to_xpd(dev); /* Is it our device? */ - if (xpd->type != XPD_TYPE_PRI) { + if (xpd->xpd_type != XPD_TYPE_PRI) { XPD_ERR(xpd, "drop suggestion for %s (%d)\n", dev_name(dev), - xpd->type); + xpd->xpd_type); return -EINVAL; } XPD_DBG(DEVICES, xpd, "SYSFS\n"); @@ -2720,7 +2720,7 @@ static int pri_xpd_remove(struct device *dev) } static struct xpd_driver pri_driver = { - .type = XPD_TYPE_PRI, + .xpd_type = XPD_TYPE_PRI, .driver = { .name = "pri", .owner = THIS_MODULE, diff --git a/drivers/dahdi/xpp/xbus-sysfs.c b/drivers/dahdi/xpp/xbus-sysfs.c index af94c3a..74d1dcc 100644 --- a/drivers/dahdi/xpp/xbus-sysfs.c +++ b/drivers/dahdi/xpp/xbus-sysfs.c @@ -731,16 +731,16 @@ static int xpd_match(struct device *dev, struct device_driver *driver) xpd_driver = driver_to_xpd_driver(driver); xpd = dev_to_xpd(dev); - if (xpd_driver->type != xpd->type) { + if (xpd_driver->xpd_type != xpd->xpd_type) { XPD_DBG(DEVICES, xpd, - "SYSFS match fail: xpd->type = %d, " - "xpd_driver->type = %d\n", - xpd->type, xpd_driver->type); + "SYSFS match fail: xpd->xpd_type = %d, " + "xpd_driver->xpd_type = %d\n", + xpd->xpd_type, xpd_driver->xpd_type); return 0; } XPD_DBG(DEVICES, xpd, - "SYSFS MATCH: type=%d dev->bus_id = %s, driver->name = %s\n", - xpd->type, dev_name(dev), driver->name); + "SYSFS MATCH: xpd_type=%d dev->bus_id = %s, driver->name = %s\n", + xpd->xpd_type, dev_name(dev), driver->name); return 1; } diff --git a/drivers/dahdi/xpp/xpd.h b/drivers/dahdi/xpp/xpd.h index 3939d76..7d5b0a4 100644 --- a/drivers/dahdi/xpp/xpd.h +++ b/drivers/dahdi/xpp/xpd.h @@ -176,7 +176,7 @@ struct xpd { struct phonedev phonedev; const struct xops *xops; - xpd_type_t type; + xpd_type_t xpd_type; const char *type_name; __u8 subtype; int subunits; /* all siblings */ @@ -217,7 +217,7 @@ struct xpd { #define for_each_line(xpd, i) \ for ((i) = 0; (i) < PHONEDEV(xpd).channels; (i)++) -#define IS_BRI(xpd) ((xpd)->type == XPD_TYPE_BRI) +#define IS_BRI(xpd) ((xpd)->xpd_type == XPD_TYPE_BRI) #define TICK_TOLERANCE 500 /* usec */ #ifdef DEBUG_SYNC_PARPORT @@ -237,7 +237,7 @@ static inline void *my_kzalloc(size_t size, gfp_t flags) } struct xpd_driver { - xpd_type_t type; + xpd_type_t xpd_type; struct device_driver driver; #define driver_to_xpd_driver(driver) \ diff --git a/drivers/dahdi/xpp/xpp_dahdi.c b/drivers/dahdi/xpp/xpp_dahdi.c index 9b5c42a..e11a389 100644 --- a/drivers/dahdi/xpp/xpp_dahdi.c +++ b/drivers/dahdi/xpp/xpp_dahdi.c @@ -279,7 +279,7 @@ static int xpd_read_proc_show(struct seq_file *sfile, void *data) seq_printf(sfile, "Address: U=%d S=%d\n", xpd->addr.unit, xpd->addr.subunit); seq_printf(sfile, "Subunits: %d\n", xpd->subunits); - seq_printf(sfile, "Type: %d.%d\n\n", xpd->type, xpd->subtype); + seq_printf(sfile, "Type: %d.%d\n\n", xpd->xpd_type, xpd->subtype); seq_printf(sfile, "pcm_len=%d\n\n", PHONEDEV(xpd).pcm_len); seq_printf(sfile, "wanted_pcm_mask=0x%04X\n\n", PHONEDEV(xpd).wanted_pcm_mask); @@ -554,7 +554,7 @@ __must_check xpd_t *xpd_alloc(xbus_t *xbus, int unit, int subunit, xpd->priv = (__u8 *)xpd + sizeof(xpd_t); spin_lock_init(&xpd->lock); xpd->card_present = 0; - xpd->type = proto_table->type; + xpd->xpd_type = proto_table->type; xpd->xproto = proto_table; xpd->xops = proto_table->xops; xpd->xpd_state = XPD_STATE_START; @@ -949,13 +949,13 @@ const char *xpp_echocan_name(const struct dahdi_chan *chan) * quirks and limitations */ if (xbus->quirks.has_fxo) { - if (xbus->quirks.has_digital_span && xpd->type == XPD_TYPE_FXO) { + if (xbus->quirks.has_digital_span && xpd->xpd_type == XPD_TYPE_FXO) { LINE_NOTICE(xpd, pos, "quirk: give up HWEC on FXO: " "AB has digital span\n"); return NULL; } else if (xbus->sync_mode != SYNC_MODE_AB - && xpd->type == XPD_TYPE_FXS) { + && xpd->xpd_type == XPD_TYPE_FXS) { LINE_NOTICE(xpd, pos, "quirk: give up HWEC on FXS: " "AB has FXO and is sync slave\n"); diff --git a/drivers/dahdi/xpp/xproto.c b/drivers/dahdi/xpp/xproto.c index 1fd130c..a977c8c 100644 --- a/drivers/dahdi/xpp/xproto.c +++ b/drivers/dahdi/xpp/xproto.c @@ -191,20 +191,20 @@ static int packet_process(xbus_t *xbus, xpacket_t *pack) } goto out; } - xtable = xproto_table(xpd->type); + xtable = xproto_table(xpd->xpd_type); if (!xtable) { if (printk_ratelimit()) XPD_ERR(xpd, - "%s: no protocol table (type=%d)\n", - __func__, xpd->type); + "%s: no protocol table (xpd_type=%d)\n", + __func__, xpd->xpd_type); goto out; } xe = xproto_card_entry(xtable, op); if (!xe) { if (printk_ratelimit()) { XPD_NOTICE(xpd, - "%s: bad command (type=%d,opcode=0x%x)\n", - __func__, xpd->type, op); + "%s: bad command (xpd_type=%d,opcode=0x%x)\n", + __func__, xpd->xpd_type, op); dump_packet("packet_process -- bad command", pack, 1); }