Skip to content

Commit db1962c

Browse files
rgantoisWolfram Sang
authored andcommitted
i2c: rename field 'alias_list' of struct i2c_atr_chan to 'alias_pairs'
The "alias_list" field of struct i2c_atr_chan describes translation table entries programmed in the ATR channel. This terminology will become more confusing when per-channel alias pool support is introduced, as struct i2c_atr_chan will gain a new field called "alias_pool", which will describe aliases which are available to the ATR channel. Rename the "alias_list" field to "alias_pairs" to clearly distinguish it from the future "alias_pool" field. No functional change is intended. Tested-by: Tomi Valkeinen <[email protected]> Signed-off-by: Romain Gantois <[email protected]> Acked-by: Andi Shyti <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent 24960bd commit db1962c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/i2c/i2c-atr.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ struct i2c_atr_alias_pool {
5656
* @adap: The &struct i2c_adapter for the channel
5757
* @atr: The parent I2C ATR
5858
* @chan_id: The ID of this channel
59-
* @alias_list: List of @struct i2c_atr_alias_pair containing the
59+
* @alias_pairs: List of @struct i2c_atr_alias_pair containing the
6060
* assigned aliases
6161
* @orig_addrs_lock: Mutex protecting @orig_addrs
6262
* @orig_addrs: Buffer used to store the original addresses during transmit
@@ -67,7 +67,7 @@ struct i2c_atr_chan {
6767
struct i2c_atr *atr;
6868
u32 chan_id;
6969

70-
struct list_head alias_list;
70+
struct list_head alias_pairs;
7171

7272
/* Lock orig_addrs during xfer */
7373
struct mutex orig_addrs_lock;
@@ -192,7 +192,7 @@ static int i2c_atr_map_msgs(struct i2c_atr_chan *chan, struct i2c_msg *msgs,
192192
for (i = 0; i < num; i++) {
193193
chan->orig_addrs[i] = msgs[i].addr;
194194

195-
c2a = i2c_atr_find_mapping_by_addr(&chan->alias_list,
195+
c2a = i2c_atr_find_mapping_by_addr(&chan->alias_pairs,
196196
msgs[i].addr);
197197
if (!c2a) {
198198
dev_err(atr->dev, "client 0x%02x not mapped!\n",
@@ -262,7 +262,7 @@ static int i2c_atr_smbus_xfer(struct i2c_adapter *adap, u16 addr,
262262
struct i2c_adapter *parent = atr->parent;
263263
struct i2c_atr_alias_pair *c2a;
264264

265-
c2a = i2c_atr_find_mapping_by_addr(&chan->alias_list, addr);
265+
c2a = i2c_atr_find_mapping_by_addr(&chan->alias_pairs, addr);
266266
if (!c2a) {
267267
dev_err(atr->dev, "client 0x%02x not mapped!\n", addr);
268268
return -ENXIO;
@@ -380,7 +380,7 @@ static int i2c_atr_attach_addr(struct i2c_adapter *adapter,
380380

381381
c2a->addr = addr;
382382
c2a->alias = alias;
383-
list_add(&c2a->node, &chan->alias_list);
383+
list_add(&c2a->node, &chan->alias_pairs);
384384

385385
return 0;
386386

@@ -401,7 +401,7 @@ static void i2c_atr_detach_addr(struct i2c_adapter *adapter,
401401

402402
atr->ops->detach_addr(atr, chan->chan_id, addr);
403403

404-
c2a = i2c_atr_find_mapping_by_addr(&chan->alias_list, addr);
404+
c2a = i2c_atr_find_mapping_by_addr(&chan->alias_pairs, addr);
405405
if (!c2a) {
406406
/* This should never happen */
407407
dev_warn(atr->dev, "Unable to find address mapping\n");
@@ -621,7 +621,7 @@ int i2c_atr_add_adapter(struct i2c_atr *atr, u32 chan_id,
621621

622622
chan->atr = atr;
623623
chan->chan_id = chan_id;
624-
INIT_LIST_HEAD(&chan->alias_list);
624+
INIT_LIST_HEAD(&chan->alias_pairs);
625625
mutex_init(&chan->orig_addrs_lock);
626626

627627
snprintf(chan->adap.name, sizeof(chan->adap.name), "i2c-%d-atr-%d",

0 commit comments

Comments
 (0)