| The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 1 | /**************************************************************************** | 
|  | 2 | **************************************************************************** | 
|  | 3 | *** | 
|  | 4 | ***   This header was automatically generated from a Linux kernel header | 
|  | 5 | ***   of the same name, to make information necessary for userspace to | 
|  | 6 | ***   call into the kernel available to libc.  It contains only constants, | 
|  | 7 | ***   structures, and macros generated from the original header, and thus, | 
|  | 8 | ***   contains no copyrightable information. | 
|  | 9 | *** | 
|  | 10 | **************************************************************************** | 
|  | 11 | ****************************************************************************/ | 
|  | 12 | #ifndef _PLATFORM_DEVICE_H_ | 
|  | 13 | #define _PLATFORM_DEVICE_H_ | 
|  | 14 |  | 
|  | 15 | #include <linux/device.h> | 
|  | 16 |  | 
|  | 17 | struct platform_device { | 
|  | 18 | const char * name; | 
|  | 19 | u32 id; | 
|  | 20 | struct device dev; | 
|  | 21 | u32 num_resources; | 
|  | 22 | struct resource * resource; | 
|  | 23 | }; | 
|  | 24 |  | 
|  | 25 | #define to_platform_device(x) container_of((x), struct platform_device, dev) | 
|  | 26 |  | 
|  | 27 | struct platform_driver { | 
|  | 28 | int (*probe)(struct platform_device *); | 
|  | 29 | int (*remove)(struct platform_device *); | 
|  | 30 | void (*shutdown)(struct platform_device *); | 
|  | 31 | int (*suspend)(struct platform_device *, pm_message_t state); | 
|  | 32 | int (*resume)(struct platform_device *); | 
|  | 33 | struct device_driver driver; | 
|  | 34 | }; | 
|  | 35 |  | 
|  | 36 | #define platform_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev) | 
|  | 37 | #define platform_set_drvdata(_dev,data) dev_set_drvdata(&(_dev)->dev, (data)) | 
|  | 38 |  | 
|  | 39 | #endif |