diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2012-04-17 20:05:08 -0700 |
---|---|---|
committer | android code review <noreply-gerritcodereview@google.com> | 2012-04-17 20:05:08 -0700 |
commit | 78060bd30f50c43c7442f32e7740efcdb87ba587 (patch) | |
tree | 1e867c19b9592103f72f6edcd9f6eb2d64bee571 /sysroot/usr/include/linux/transport_class.h | |
parent | ab3b7cbd040e44324deb24cf68f5c4b92631d2a6 (diff) | |
parent | 89f86579c259fb217b18f2414787220f45ece7fd (diff) | |
download | mipsel-linux-android-4.4.3-78060bd30f50c43c7442f32e7740efcdb87ba587.tar.gz |
Merge "Adding mipsel-linux-android- cross toolchain"android-sdk-adt_r20android-cts-4.1_r4android-cts-4.1_r2android-cts-4.1_r1android-4.1.2_r2.1android-4.1.2_r2android-4.1.2_r1android-4.1.1_r6.1android-4.1.1_r6android-4.1.1_r5android-4.1.1_r4android-4.1.1_r3android-4.1.1_r2android-4.1.1_r1.1android-4.1.1_r1tools_r20jb-releasejb-mr0-releasejb-devics-plus-aosp
Diffstat (limited to 'sysroot/usr/include/linux/transport_class.h')
-rw-r--r-- | sysroot/usr/include/linux/transport_class.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/sysroot/usr/include/linux/transport_class.h b/sysroot/usr/include/linux/transport_class.h new file mode 100644 index 0000000..71ad084 --- /dev/null +++ b/sysroot/usr/include/linux/transport_class.h @@ -0,0 +1,48 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + **************************************************************************** + ****************************************************************************/ +#ifndef _TRANSPORT_CLASS_H_ +#define _TRANSPORT_CLASS_H_ + +#include <linux/device.h> +#include <linux/attribute_container.h> + +struct transport_container; + +struct transport_class { + struct class class; + int (*setup)(struct transport_container *, struct device *, + struct class_device *); + int (*configure)(struct transport_container *, struct device *, + struct class_device *); + int (*remove)(struct transport_container *, struct device *, + struct class_device *); +}; + +#define DECLARE_TRANSPORT_CLASS(cls, nm, su, rm, cfg) struct transport_class cls = { .class = { .name = nm, }, .setup = su, .remove = rm, .configure = cfg, } + +struct anon_transport_class { + struct transport_class tclass; + struct attribute_container container; +}; + +#define DECLARE_ANON_TRANSPORT_CLASS(cls, mtch, cfg) struct anon_transport_class cls = { .tclass = { .configure = cfg, }, . container = { .match = mtch, }, } + +#define class_to_transport_class(x) container_of(x, struct transport_class, class) + +struct transport_container { + struct attribute_container ac; + struct attribute_group *statistics; +}; + +#define attribute_container_to_transport_container(x) container_of(x, struct transport_container, ac) + +#endif |