X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=ndk%2Fandroid-ndk-r4%2Fdarwin%2Fplatforms%2Fandroid-8%2Farch-x86%2Fusr%2Finclude%2Flinux%2Ftransport_class.h;fp=ndk%2Fandroid-ndk-r4%2Fdarwin%2Fplatforms%2Fandroid-8%2Farch-x86%2Fusr%2Finclude%2Flinux%2Ftransport_class.h;h=71ad084502ec79f9d8795c19111fdf0c256db785;hb=72eddb87bfc38a2f6fae40566ec6380eb838489a;hp=0000000000000000000000000000000000000000;hpb=e19e12d257815bef7bfe4f3d81056a5b2464c464;p=android-x86%2Fprebuilt.git diff --git a/ndk/android-ndk-r4/darwin/platforms/android-8/arch-x86/usr/include/linux/transport_class.h b/ndk/android-ndk-r4/darwin/platforms/android-8/arch-x86/usr/include/linux/transport_class.h new file mode 100644 index 0000000..71ad084 --- /dev/null +++ b/ndk/android-ndk-r4/darwin/platforms/android-8/arch-x86/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 +#include + +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