]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - drivers/staging/greybus/module.h
net: add netlink_ext_ack argument to rtnl_link_ops.validate
[mirror_ubuntu-bionic-kernel.git] / drivers / staging / greybus / module.h
CommitLineData
b15d97d7
JH
1/*
2 * Greybus Module code
3 *
4 * Copyright 2016 Google Inc.
5 * Copyright 2016 Linaro Ltd.
6 *
7 * Released under the GPLv2 only.
8 */
9
10#ifndef __MODULE_H
11#define __MODULE_H
12
13struct gb_module {
14 struct device dev;
15 struct gb_host_device *hd;
16
17 struct list_head hd_node;
18
19 u8 module_id;
20 size_t num_interfaces;
21
22 bool disconnected;
23
24 struct gb_interface *interfaces[0];
25};
26#define to_gb_module(d) container_of(d, struct gb_module, dev)
27
28struct gb_module *gb_module_create(struct gb_host_device *hd, u8 module_id,
29 size_t num_interfaces);
30int gb_module_add(struct gb_module *module);
31void gb_module_del(struct gb_module *module);
32void gb_module_put(struct gb_module *module);
33
34#endif /* __MODULE_H */