greybus: hd: rename host-device structure
[cascardo/linux.git] / drivers / staging / greybus / module.h
1 /*
2  * Greybus module code
3  *
4  * Copyright 2014 Google Inc.
5  *
6  * Released under the GPLv2 only.
7  */
8
9 #ifndef __MODULE_H
10 #define __MODULE_H
11
12 /* Greybus "public" definitions" */
13 struct gb_module {
14         struct device dev;
15         u8 module_id;           /* Physical location within the Endo */
16 };
17 #define to_gb_module(d) container_of(d, struct gb_module, dev)
18
19 struct gb_host_device;
20
21 /* Greybus "private" definitions */
22 struct gb_module *gb_module_find(struct gb_host_device *hd, u8 module_id);
23 struct gb_module *gb_module_create(struct device *parent, u8 module_id);
24 void gb_module_remove_all(struct gb_endo *endo);
25
26 #endif /* __MODULE_H */