summaryrefslogtreecommitdiffstats
path: root/net/caif/cfcnfg.c
diff options
context:
space:
mode:
authorTakashi Iwai2010-12-13 09:29:52 +0100
committerTakashi Iwai2010-12-13 09:29:52 +0100
commit354d14b3f53cc749c5d26d4ba7280d1e931d6bc4 (patch)
tree59b597e44902d8db8bde7deac1e7e707327c6fe6 /net/caif/cfcnfg.c
parentALSA: aoa: Remove wrong i2c_set_clientdata in onyx_i2c_remove() (diff)
parentsound: don't use flush_scheduled_work() (diff)
downloadkernel-qcow2-linux-354d14b3f53cc749c5d26d4ba7280d1e931d6bc4.tar.gz
kernel-qcow2-linux-354d14b3f53cc749c5d26d4ba7280d1e931d6bc4.tar.xz
kernel-qcow2-linux-354d14b3f53cc749c5d26d4ba7280d1e931d6bc4.zip
Merge branch 'topic/workq-update' into topic/misc
Diffstat (limited to 'net/caif/cfcnfg.c')
-rw-r--r--net/caif/cfcnfg.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/net/caif/cfcnfg.c b/net/caif/cfcnfg.c
index 41adafd18914..21ede141018a 100644
--- a/net/caif/cfcnfg.c
+++ b/net/caif/cfcnfg.c
@@ -173,18 +173,15 @@ static struct cfcnfg_phyinfo *cfcnfg_get_phyinfo(struct cfcnfg *cnfg,
return NULL;
}
-int cfcnfg_get_named(struct cfcnfg *cnfg, char *name)
+
+int cfcnfg_get_id_from_ifi(struct cfcnfg *cnfg, int ifi)
{
int i;
-
- /* Try to match with specified name */
- for (i = 0; i < MAX_PHY_LAYERS; i++) {
- if (cnfg->phy_layers[i].frm_layer != NULL
- && strcmp(cnfg->phy_layers[i].phy_layer->name,
- name) == 0)
- return cnfg->phy_layers[i].frm_layer->id;
- }
- return 0;
+ for (i = 0; i < MAX_PHY_LAYERS; i++)
+ if (cnfg->phy_layers[i].frm_layer != NULL &&
+ cnfg->phy_layers[i].ifindex == ifi)
+ return i;
+ return -ENODEV;
}
int cfcnfg_disconn_adapt_layer(struct cfcnfg *cnfg, struct cflayer *adap_layer)