alistair23-linux/drivers/staging/greybus/module.h
Greg Kroah-Hartman e5646710c1 greybus: module: get rid of global list of modules
Use the list that the driver core keeps of our structure, no need to
duplicate it with a local list as well.  This gets rid of a static lock
too, always a nice thing to do.

Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Reviewed-by: Alex Elder <elder@linaro.org>
2015-01-02 13:05:42 -08:00

27 lines
527 B
C

/*
* Greybus module code
*
* Copyright 2014 Google Inc.
*
* Released under the GPLv2 only.
*/
#ifndef __MODULE_H
#define __MODULE_H
/* Greybus "public" definitions" */
struct gb_module {
struct device dev;
u8 module_id; /* Physical location within the Endo */
};
#define to_gb_module(d) container_of(d, struct gb_module, dev)
struct greybus_host_device;
/* Greybus "private" definitions */
struct gb_module *gb_module_find_or_create(struct greybus_host_device *hd,
u8 module_id);
#endif /* __MODULE_H */