caif: __dev_get_by_index instead of dev_get_by_index to find interface
authorYing Xue <ying.xue@windriver.com>
Wed, 15 Jan 2014 02:23:43 +0000 (10:23 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Jan 2014 02:50:47 +0000 (18:50 -0800)
commita74e9426948cce451af0433c69a120178948cb03
treeff913e11bda927f62166dbb7afd55202abca3710
parent16b77695ed8fa158be864ee448a9ef4c78457c14
caif: __dev_get_by_index instead of dev_get_by_index to find interface

The following call chains indicate that chnl_net_open() is under
rtnl_lock protection as __dev_open() is protected by rtnl_lock.
So if __dev_get_by_index() instead of dev_get_by_index() is used
to find interface handler in it, this would help us avoid to change
interface reference counter.

__dev_open()
  chnl_net_open()

Cc: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/caif/chnl_net.c