Commit 11b3348f authored by Christian Gromm's avatar Christian Gromm Committed by Greg Kroah-Hartman

staging: most: net: remove aim designators

This patch renames the all aim designators with comp. It is needed because
userspace interfacing modules are referred to as components.
Signed-off-by: default avatarChristian Gromm <christian.gromm@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent db09fe0d
// SPDX-License-Identifier: GPL-2.0 // SPDX-License-Identifier: GPL-2.0
/* /*
* Networking AIM - Networking Application Interface Module for MostCore * Networking component - Networking Application Interface Module for MostCore
* *
* Copyright (C) 2015, Microchip Technology Germany II GmbH & Co. KG * Copyright (C) 2015, Microchip Technology Germany II GmbH & Co. KG
*/ */
...@@ -68,7 +68,7 @@ struct net_dev_context { ...@@ -68,7 +68,7 @@ struct net_dev_context {
static struct list_head net_devices = LIST_HEAD_INIT(net_devices); static struct list_head net_devices = LIST_HEAD_INIT(net_devices);
static struct mutex probe_disc_mt; /* ch->linked = true, most_nd_open */ static struct mutex probe_disc_mt; /* ch->linked = true, most_nd_open */
static struct spinlock list_lock; /* list_head, ch->linked = false, dev_hold */ static struct spinlock list_lock; /* list_head, ch->linked = false, dev_hold */
static struct core_component aim; static struct core_component comp;
static int skb_to_mamac(const struct sk_buff *skb, struct mbo *mbo) static int skb_to_mamac(const struct sk_buff *skb, struct mbo *mbo)
{ {
...@@ -178,15 +178,15 @@ static int most_nd_open(struct net_device *dev) ...@@ -178,15 +178,15 @@ static int most_nd_open(struct net_device *dev)
mutex_lock(&probe_disc_mt); mutex_lock(&probe_disc_mt);
if (most_start_channel(nd->iface, nd->rx.ch_id, &aim)) { if (most_start_channel(nd->iface, nd->rx.ch_id, &comp)) {
netdev_err(dev, "most_start_channel() failed\n"); netdev_err(dev, "most_start_channel() failed\n");
ret = -EBUSY; ret = -EBUSY;
goto unlock; goto unlock;
} }
if (most_start_channel(nd->iface, nd->tx.ch_id, &aim)) { if (most_start_channel(nd->iface, nd->tx.ch_id, &comp)) {
netdev_err(dev, "most_start_channel() failed\n"); netdev_err(dev, "most_start_channel() failed\n");
most_stop_channel(nd->iface, nd->rx.ch_id, &aim); most_stop_channel(nd->iface, nd->rx.ch_id, &comp);
ret = -EBUSY; ret = -EBUSY;
goto unlock; goto unlock;
} }
...@@ -212,8 +212,8 @@ static int most_nd_stop(struct net_device *dev) ...@@ -212,8 +212,8 @@ static int most_nd_stop(struct net_device *dev)
netif_stop_queue(dev); netif_stop_queue(dev);
if (nd->iface->request_netinfo) if (nd->iface->request_netinfo)
nd->iface->request_netinfo(nd->iface, nd->tx.ch_id, NULL); nd->iface->request_netinfo(nd->iface, nd->tx.ch_id, NULL);
most_stop_channel(nd->iface, nd->rx.ch_id, &aim); most_stop_channel(nd->iface, nd->rx.ch_id, &comp);
most_stop_channel(nd->iface, nd->tx.ch_id, &aim); most_stop_channel(nd->iface, nd->tx.ch_id, &comp);
return 0; return 0;
} }
...@@ -225,7 +225,7 @@ static netdev_tx_t most_nd_start_xmit(struct sk_buff *skb, ...@@ -225,7 +225,7 @@ static netdev_tx_t most_nd_start_xmit(struct sk_buff *skb,
struct mbo *mbo; struct mbo *mbo;
int ret; int ret;
mbo = most_get_mbo(nd->iface, nd->tx.ch_id, &aim); mbo = most_get_mbo(nd->iface, nd->tx.ch_id, &comp);
if (!mbo) { if (!mbo) {
netif_stop_queue(dev); netif_stop_queue(dev);
...@@ -290,8 +290,8 @@ static struct net_dev_context *get_net_dev_hold(struct most_interface *iface) ...@@ -290,8 +290,8 @@ static struct net_dev_context *get_net_dev_hold(struct most_interface *iface)
return nd; return nd;
} }
static int aim_probe_channel(struct most_interface *iface, int channel_idx, static int comp_probe_channel(struct most_interface *iface, int channel_idx,
struct most_channel_config *ccfg, char *name) struct most_channel_config *ccfg, char *name)
{ {
struct net_dev_context *nd; struct net_dev_context *nd;
struct net_dev_channel *ch; struct net_dev_channel *ch;
...@@ -346,8 +346,8 @@ static int aim_probe_channel(struct most_interface *iface, int channel_idx, ...@@ -346,8 +346,8 @@ static int aim_probe_channel(struct most_interface *iface, int channel_idx,
return ret; return ret;
} }
static int aim_disconnect_channel(struct most_interface *iface, static int comp_disconnect_channel(struct most_interface *iface,
int channel_idx) int channel_idx)
{ {
struct net_dev_context *nd; struct net_dev_context *nd;
struct net_dev_channel *ch; struct net_dev_channel *ch;
...@@ -393,8 +393,8 @@ static int aim_disconnect_channel(struct most_interface *iface, ...@@ -393,8 +393,8 @@ static int aim_disconnect_channel(struct most_interface *iface,
return ret; return ret;
} }
static int aim_resume_tx_channel(struct most_interface *iface, static int comp_resume_tx_channel(struct most_interface *iface,
int channel_idx) int channel_idx)
{ {
struct net_dev_context *nd; struct net_dev_context *nd;
...@@ -412,7 +412,7 @@ static int aim_resume_tx_channel(struct most_interface *iface, ...@@ -412,7 +412,7 @@ static int aim_resume_tx_channel(struct most_interface *iface,
return 0; return 0;
} }
static int aim_rx_data(struct mbo *mbo) static int comp_rx_data(struct mbo *mbo)
{ {
const u32 zero = 0; const u32 zero = 0;
struct net_dev_context *nd; struct net_dev_context *nd;
...@@ -494,24 +494,24 @@ static int aim_rx_data(struct mbo *mbo) ...@@ -494,24 +494,24 @@ static int aim_rx_data(struct mbo *mbo)
return ret; return ret;
} }
static struct core_component aim = { static struct core_component comp = {
.name = "net", .name = "net",
.probe_channel = aim_probe_channel, .probe_channel = comp_probe_channel,
.disconnect_channel = aim_disconnect_channel, .disconnect_channel = comp_disconnect_channel,
.tx_completion = aim_resume_tx_channel, .tx_completion = comp_resume_tx_channel,
.rx_completion = aim_rx_data, .rx_completion = comp_rx_data,
}; };
static int __init most_net_init(void) static int __init most_net_init(void)
{ {
spin_lock_init(&list_lock); spin_lock_init(&list_lock);
mutex_init(&probe_disc_mt); mutex_init(&probe_disc_mt);
return most_register_component(&aim); return most_register_component(&comp);
} }
static void __exit most_net_exit(void) static void __exit most_net_exit(void)
{ {
most_deregister_component(&aim); most_deregister_component(&comp);
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment