staging: most: rename struct core_component

The stuctures defined in the most.h header file will be exposed to the
kernel once the file is moved out of the staging area. That's why the name
is changed into something more descriptive.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1576238662-16512-3-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Christian Gromm 2019-12-13 13:04:15 +01:00 коммит произвёл Greg Kroah-Hartman
Родитель c1d3fb8abe
Коммит 45917e7920
7 изменённых файлов: 36 добавлений и 36 удалений

Просмотреть файл

@ -25,7 +25,7 @@ static struct cdev_component {
struct ida minor_id;
unsigned int major;
struct class *class;
struct core_component cc;
struct most_component cc;
} comp;
struct comp_channel {

Просмотреть файл

@ -630,7 +630,7 @@ static struct most_sound most_sound_subsys = {
},
};
int most_register_configfs_subsys(struct core_component *c)
int most_register_configfs_subsys(struct most_component *c)
{
int ret;
@ -674,7 +674,7 @@ void most_interface_register_notify(const char *mdev)
most_cfg_complete("sound");
}
void most_deregister_configfs_subsys(struct core_component *c)
void most_deregister_configfs_subsys(struct most_component *c)
{
if (!strcmp(c->name, "cdev"))
configfs_unregister_subsystem(&most_cdev.subsys);

Просмотреть файл

@ -39,7 +39,7 @@ static struct mostcore {
#define to_driver(d) container_of(d, struct mostcore, drv)
struct pipe {
struct core_component *comp;
struct most_component *comp;
int refs;
int num_buffers;
};
@ -454,9 +454,9 @@ static const struct attribute_group *interface_attr_groups[] = {
NULL,
};
static struct core_component *match_component(char *name)
static struct most_component *match_component(char *name)
{
struct core_component *comp;
struct most_component *comp;
list_for_each_entry(comp, &mc.comp_list, list) {
if (!strcmp(comp->name, name))
@ -510,7 +510,7 @@ static ssize_t links_show(struct device_driver *drv, char *buf)
static ssize_t components_show(struct device_driver *drv, char *buf)
{
struct core_component *comp;
struct most_component *comp;
int offs = 0;
list_for_each_entry(comp, &mc.comp_list, list) {
@ -544,12 +544,12 @@ static struct most_channel *get_channel(char *mdev, char *mdev_ch)
static
inline int link_channel_to_component(struct most_channel *c,
struct core_component *comp,
struct most_component *comp,
char *name,
char *comp_param)
{
int ret;
struct core_component **comp_ptr;
struct most_component **comp_ptr;
if (!c->pipe0.comp)
comp_ptr = &c->pipe0.comp;
@ -660,7 +660,7 @@ int most_set_cfg_packets_xact(char *mdev, char *mdev_ch, u16 val)
int most_cfg_complete(char *comp_name)
{
struct core_component *comp;
struct most_component *comp;
comp = match_component(comp_name);
if (!comp)
@ -673,7 +673,7 @@ int most_add_link(char *mdev, char *mdev_ch, char *comp_name, char *link_name,
char *comp_param)
{
struct most_channel *c = get_channel(mdev, mdev_ch);
struct core_component *comp = match_component(comp_name);
struct most_component *comp = match_component(comp_name);
if (!c || !comp)
return -ENODEV;
@ -684,7 +684,7 @@ int most_add_link(char *mdev, char *mdev_ch, char *comp_name, char *link_name,
int most_remove_link(char *mdev, char *mdev_ch, char *comp_name)
{
struct most_channel *c;
struct core_component *comp;
struct most_component *comp;
comp = match_component(comp_name);
if (!comp)
@ -950,7 +950,7 @@ static void most_write_completion(struct mbo *mbo)
}
int channel_has_mbo(struct most_interface *iface, int id,
struct core_component *comp)
struct most_component *comp)
{
struct most_channel *c = iface->p->channel[id];
unsigned long flags;
@ -981,7 +981,7 @@ EXPORT_SYMBOL_GPL(channel_has_mbo);
* Returns a pointer to MBO on success or NULL otherwise.
*/
struct mbo *most_get_mbo(struct most_interface *iface, int id,
struct core_component *comp)
struct most_component *comp)
{
struct mbo *mbo;
struct most_channel *c;
@ -1087,7 +1087,7 @@ static void most_read_completion(struct mbo *mbo)
* Returns 0 on success or error code otherwise.
*/
int most_start_channel(struct most_interface *iface, int id,
struct core_component *comp)
struct most_component *comp)
{
int num_buffer;
int ret;
@ -1157,7 +1157,7 @@ EXPORT_SYMBOL_GPL(most_start_channel);
* @comp: driver component
*/
int most_stop_channel(struct most_interface *iface, int id,
struct core_component *comp)
struct most_component *comp)
{
struct most_channel *c;
@ -1215,7 +1215,7 @@ EXPORT_SYMBOL_GPL(most_stop_channel);
* most_register_component - registers a driver component with the core
* @comp: driver component
*/
int most_register_component(struct core_component *comp)
int most_register_component(struct most_component *comp)
{
if (!comp) {
pr_err("Bad component\n");
@ -1231,7 +1231,7 @@ static int disconnect_channels(struct device *dev, void *data)
{
struct most_interface *iface;
struct most_channel *c, *tmp;
struct core_component *comp = data;
struct most_component *comp = data;
iface = to_most_interface(dev);
list_for_each_entry_safe(c, tmp, &iface->p->channel_list, list) {
@ -1249,7 +1249,7 @@ static int disconnect_channels(struct device *dev, void *data)
* most_deregister_component - deregisters a driver component with the core
* @comp: driver component
*/
int most_deregister_component(struct core_component *comp)
int most_deregister_component(struct most_component *comp)
{
if (!comp) {
pr_err("Bad component\n");

Просмотреть файл

@ -254,7 +254,7 @@ struct most_interface {
#define to_most_interface(d) container_of(d, struct most_interface, dev)
/**
* struct core_component - identifies a loadable component for the mostcore
* struct most_component - identifies a loadable component for the mostcore
* @list: list_head
* @name: component name
* @probe_channel: function for core to notify driver about channel connection
@ -262,7 +262,7 @@ struct most_interface {
* @rx_completion: completion handler for received packets
* @tx_completion: completion handler for transmitted packets
*/
struct core_component {
struct most_component {
struct list_head list;
const char *name;
struct module *mod;
@ -310,20 +310,20 @@ void most_stop_enqueue(struct most_interface *iface, int channel_idx);
* in wait fifo.
*/
void most_resume_enqueue(struct most_interface *iface, int channel_idx);
int most_register_component(struct core_component *comp);
int most_deregister_component(struct core_component *comp);
int most_register_component(struct most_component *comp);
int most_deregister_component(struct most_component *comp);
struct mbo *most_get_mbo(struct most_interface *iface, int channel_idx,
struct core_component *comp);
struct most_component *comp);
void most_put_mbo(struct mbo *mbo);
int channel_has_mbo(struct most_interface *iface, int channel_idx,
struct core_component *comp);
struct most_component *comp);
int most_start_channel(struct most_interface *iface, int channel_idx,
struct core_component *comp);
struct most_component *comp);
int most_stop_channel(struct most_interface *iface, int channel_idx,
struct core_component *comp);
struct most_component *comp);
int __init configfs_init(void);
int most_register_configfs_subsys(struct core_component *comp);
void most_deregister_configfs_subsys(struct core_component *comp);
int most_register_configfs_subsys(struct most_component *comp);
void most_deregister_configfs_subsys(struct most_component *comp);
int most_add_link(char *mdev, char *mdev_ch, char *comp_name, char *link_name,
char *comp_param);
int most_remove_link(char *mdev, char *mdev_ch, char *comp_name);

Просмотреть файл

@ -70,7 +70,7 @@ struct net_dev_context {
static struct list_head net_devices = LIST_HEAD_INIT(net_devices);
static struct mutex probe_disc_mt; /* ch->linked = true, most_nd_open */
static DEFINE_SPINLOCK(list_lock); /* list_head, ch->linked = false, dev_hold */
static struct core_component comp;
static struct most_component comp;
static int skb_to_mamac(const struct sk_buff *skb, struct mbo *mbo)
{
@ -497,7 +497,7 @@ put_nd:
return ret;
}
static struct core_component comp = {
static struct most_component comp = {
.mod = THIS_MODULE,
.name = "net",
.probe_channel = comp_probe_channel,

Просмотреть файл

@ -22,7 +22,7 @@
#define DRIVER_NAME "sound"
#define STRING_SIZE 80
static struct core_component comp;
static struct most_component comp;
/**
* struct channel - private structure to keep channel specific data
@ -736,9 +736,9 @@ static int audio_tx_completion(struct most_interface *iface, int channel_id)
}
/**
* Initialization of the struct core_component
* Initialization of the struct most_component
*/
static struct core_component comp = {
static struct most_component comp = {
.mod = THIS_MODULE,
.name = DRIVER_NAME,
.probe_channel = audio_probe_channel,

Просмотреть файл

@ -25,7 +25,7 @@
#define V4L2_CMP_MAX_INPUT 1
static struct core_component comp;
static struct most_component comp;
struct most_video_dev {
struct most_interface *iface;
@ -527,7 +527,7 @@ static int comp_disconnect_channel(struct most_interface *iface,
return 0;
}
static struct core_component comp = {
static struct most_component comp = {
.mod = THIS_MODULE,
.name = "video",
.probe_channel = comp_probe_channel,