summaryrefslogtreecommitdiffstats
path: root/net/caif/caif_dev.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2011-04-11 10:43:50 +0000
committerDavid S. Miller <davem@davemloft.net>2011-04-11 15:08:47 -0700
commit73d6ac633c6c0ca703f90db0b808d9593e46aef6 (patch)
tree738fb16f97e24288f9db9c6b43b4bcee4f794dc6 /net/caif/caif_dev.c
parent1c01a80cfec6f806246f31ff2680cd3639b30e67 (diff)
downloadop-kernel-dev-73d6ac633c6c0ca703f90db0b808d9593e46aef6.zip
op-kernel-dev-73d6ac633c6c0ca703f90db0b808d9593e46aef6.tar.gz
caif: code cleanup
Cleanup of new CAIF code. * make local functions static * remove code that is never used * expand get_caif_conf() since wrapper is no longer needed * make args to comparison functions const * rename connect_req_to_link_param to keep exported names consistent Compile tested only. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/caif/caif_dev.c')
-rw-r--r--net/caif/caif_dev.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c
index a42a408..b533bb0 100644
--- a/net/caif/caif_dev.c
+++ b/net/caif/caif_dev.c
@@ -257,7 +257,7 @@ static int caif_device_notify(struct notifier_block *me, unsigned long what,
break;
}
dev_hold(dev);
- cfcnfg_add_phy_layer(get_caif_conf(),
+ cfcnfg_add_phy_layer(cfg,
phy_type,
dev,
&caifd->layer,
@@ -300,7 +300,7 @@ static int caif_device_notify(struct notifier_block *me, unsigned long what,
if (atomic_read(&caifd->in_use))
netdev_warn(dev,
"Unregistering an active CAIF device\n");
- cfcnfg_del_phy_layer(get_caif_conf(), &caifd->layer);
+ cfcnfg_del_phy_layer(cfg, &caifd->layer);
dev_put(dev);
atomic_set(&caifd->state, what);
break;
@@ -322,24 +322,18 @@ static struct notifier_block caif_device_notifier = {
.priority = 0,
};
-
-struct cfcnfg *get_caif_conf(void)
-{
- return cfg;
-}
-EXPORT_SYMBOL(get_caif_conf);
-
int caif_connect_client(struct caif_connect_request *conn_req,
struct cflayer *client_layer, int *ifindex,
int *headroom, int *tailroom)
{
struct cfctrl_link_param param;
int ret;
- ret = connect_req_to_link_param(get_caif_conf(), conn_req, &param);
+
+ ret = caif_connect_req_to_link_param(cfg, conn_req, &param);
if (ret)
return ret;
/* Hook up the adaptation layer. */
- return cfcnfg_add_adaptation_layer(get_caif_conf(), &param,
+ return cfcnfg_add_adaptation_layer(cfg, &param,
client_layer, ifindex,
headroom, tailroom);
}
@@ -347,16 +341,10 @@ EXPORT_SYMBOL(caif_connect_client);
int caif_disconnect_client(struct cflayer *adap_layer)
{
- return cfcnfg_disconn_adapt_layer(get_caif_conf(), adap_layer);
+ return cfcnfg_disconn_adapt_layer(cfg, adap_layer);
}
EXPORT_SYMBOL(caif_disconnect_client);
-void caif_release_client(struct cflayer *adap_layer)
-{
- cfcnfg_release_adap_layer(adap_layer);
-}
-EXPORT_SYMBOL(caif_release_client);
-
/* Per-namespace Caif devices handling */
static int caif_init_net(struct net *net)
{
OpenPOWER on IntegriCloud