static struct class *aim_class;
static struct ida minor_id;
static unsigned int major;
-static struct most_aim cdev_aim;
+static struct core_component cdev_aim;
struct aim_channel {
wait_queue_head_t wq;
return retval;
}
-static struct most_aim cdev_aim = {
+static struct core_component cdev_aim = {
.name = "cdev",
.probe_channel = aim_probe,
.disconnect_channel = aim_disconnect_channel,
#define to_driver(d) container_of(d, struct mostcore, drv);
struct pipe {
- struct most_aim *aim;
+ struct core_component *aim;
int refs;
int num_buffers;
};
/* ___ ___
* ___A I M___
*/
-static struct most_aim *match_module(char *name)
+static struct core_component *match_module(char *name)
{
- struct most_aim *aim;
+ struct core_component *aim;
list_for_each_entry(aim, &mc.mod_list, list) {
if (!strcmp(aim->name, name))
static ssize_t modules_show(struct device_driver *drv, char *buf)
{
- struct most_aim *aim;
+ struct core_component *aim;
int offs = 0;
list_for_each_entry(aim, &mc.mod_list, list) {
}
static
-inline int link_channel_to_aim(struct most_channel *c, struct most_aim *aim,
+inline int link_channel_to_aim(struct most_channel *c, struct core_component *aim,
char *aim_param)
{
int ret;
- struct most_aim **aim_ptr;
+ struct core_component **aim_ptr;
if (!c->pipe0.aim)
aim_ptr = &c->pipe0.aim;
size_t len)
{
struct most_channel *c;
- struct most_aim *aim;
+ struct core_component *aim;
char buffer[STRING_SIZE];
char *mdev;
char *mdev_ch;
size_t len)
{
struct most_channel *c;
- struct most_aim *aim;
+ struct core_component *aim;
char buffer[STRING_SIZE];
char *mdev;
char *mdev_ch;
arm_mbo(mbo);
}
-int channel_has_mbo(struct most_interface *iface, int id, struct most_aim *aim)
+int channel_has_mbo(struct most_interface *iface, int id, struct core_component *aim)
{
struct most_channel *c = iface->p->channel[id];
unsigned long flags;
* Returns a pointer to MBO on success or NULL otherwise.
*/
struct mbo *most_get_mbo(struct most_interface *iface, int id,
- struct most_aim *aim)
+ struct core_component *aim)
{
struct mbo *mbo;
struct most_channel *c;
* Returns 0 on success or error code otherwise.
*/
int most_start_channel(struct most_interface *iface, int id,
- struct most_aim *aim)
+ struct core_component *aim)
{
int num_buffer;
int ret;
* @id: channel ID
*/
int most_stop_channel(struct most_interface *iface, int id,
- struct most_aim *aim)
+ struct core_component *aim)
{
struct most_channel *c;
* most_register_aim - registers an AIM (driver) with the core
* @aim: instance of AIM to be registered
*/
-int most_register_aim(struct most_aim *aim)
+int most_register_aim(struct core_component *aim)
{
if (!aim) {
pr_err("Bad driver\n");
{
struct most_interface *iface;
struct most_channel *c, *tmp;
- struct most_aim *aim = data;
+ struct core_component *aim = data;
iface = to_most_interface(dev);
list_for_each_entry_safe(c, tmp, &iface->p->channel_list, list) {
* most_deregister_aim - deregisters an AIM (driver) with the core
* @aim: AIM to be removed
*/
-int most_deregister_aim(struct most_aim *aim)
+int most_deregister_aim(struct core_component *aim)
{
if (!aim) {
pr_err("Bad driver\n");
* @tx_completion: completion handler for transmitted packets
* @context: context pointer to be used by mostcore
*/
-struct most_aim {
+struct core_component {
struct list_head list;
const char *name;
int (*probe_channel)(struct most_interface *iface, int channel_idx,
int (*tx_completion)(struct most_interface *iface, int channel_idx);
};
-#define to_most_aim(d) container_of(d, struct most_aim, dev)
-
/**
* most_register_interface - Registers instance of the interface.
* @iface: Pointer to the interface instance description.
* in wait fifo.
*/
void most_resume_enqueue(struct most_interface *iface, int channel_idx);
-int most_register_aim(struct most_aim *aim);
-int most_deregister_aim(struct most_aim *aim);
+int most_register_aim(struct core_component *comp);
+int most_deregister_aim(struct core_component *comp);
struct mbo *most_get_mbo(struct most_interface *iface, int channel_idx,
- struct most_aim *);
+ struct core_component *comp);
void most_put_mbo(struct mbo *mbo);
int channel_has_mbo(struct most_interface *iface, int channel_idx,
- struct most_aim *aim);
+ struct core_component *comp);
int most_start_channel(struct most_interface *iface, int channel_idx,
- struct most_aim *);
+ struct core_component *comp);
int most_stop_channel(struct most_interface *iface, int channel_idx,
- struct most_aim *);
+ struct core_component *comp);
#endif /* MOST_CORE_H_ */
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 spinlock list_lock; /* list_head, ch->linked = false, dev_hold */
-static struct most_aim aim;
+static struct core_component aim;
static int skb_to_mamac(const struct sk_buff *skb, struct mbo *mbo)
{
return ret;
}
-static struct most_aim aim = {
+static struct core_component aim = {
.name = "net",
.probe_channel = aim_probe_channel,
.disconnect_channel = aim_disconnect_channel,
#define DRIVER_NAME "sound"
static struct list_head dev_list;
-static struct most_aim audio_aim;
+static struct core_component audio_aim;
/**
* struct channel - private structure to keep channel specific data
}
/**
- * Initialization of the struct most_aim
+ * Initialization of the struct core_component
*/
-static struct most_aim audio_aim = {
+static struct core_component audio_aim = {
.name = DRIVER_NAME,
.probe_channel = audio_probe_channel,
.disconnect_channel = audio_disconnect_channel,
#define V4L2_AIM_MAX_INPUT 1
-static struct most_aim aim_info;
+static struct core_component aim_info;
struct most_video_dev {
struct most_interface *iface;
return 0;
}
-static struct most_aim aim_info = {
+static struct core_component aim_info = {
.name = "v4l",
.probe_channel = aim_probe_channel,
.disconnect_channel = aim_disconnect_channel,