diff options
Diffstat (limited to 'include/linux/platform_device.h')
-rw-r--r-- | include/linux/platform_device.h | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 76e470a299bf..b67bb5d7b221 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
@@ -20,7 +20,6 @@ struct platform_device { | |||
20 | struct device dev; | 20 | struct device dev; |
21 | u32 num_resources; | 21 | u32 num_resources; |
22 | struct resource * resource; | 22 | struct resource * resource; |
23 | void *platform_data; | ||
24 | 23 | ||
25 | struct platform_device_id *id_entry; | 24 | struct platform_device_id *id_entry; |
26 | }; | 25 | }; |
@@ -77,4 +76,46 @@ extern int platform_driver_probe(struct platform_driver *driver, | |||
77 | #define platform_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev) | 76 | #define platform_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev) |
78 | #define platform_set_drvdata(_dev,data) dev_set_drvdata(&(_dev)->dev, (data)) | 77 | #define platform_set_drvdata(_dev,data) dev_set_drvdata(&(_dev)->dev, (data)) |
79 | 78 | ||
79 | /* early platform driver interface */ | ||
80 | struct early_platform_driver { | ||
81 | const char *class_str; | ||
82 | struct platform_driver *pdrv; | ||
83 | struct list_head list; | ||
84 | int requested_id; | ||
85 | }; | ||
86 | |||
87 | #define EARLY_PLATFORM_ID_UNSET -2 | ||
88 | #define EARLY_PLATFORM_ID_ERROR -3 | ||
89 | |||
90 | extern int early_platform_driver_register(struct early_platform_driver *epdrv, | ||
91 | char *buf); | ||
92 | extern void early_platform_add_devices(struct platform_device **devs, int num); | ||
93 | |||
94 | static inline int is_early_platform_device(struct platform_device *pdev) | ||
95 | { | ||
96 | return !pdev->dev.driver; | ||
97 | } | ||
98 | |||
99 | extern void early_platform_driver_register_all(char *class_str); | ||
100 | extern int early_platform_driver_probe(char *class_str, | ||
101 | int nr_probe, int user_only); | ||
102 | extern void early_platform_cleanup(void); | ||
103 | |||
104 | |||
105 | #ifndef MODULE | ||
106 | #define early_platform_init(class_string, platform_driver) \ | ||
107 | static __initdata struct early_platform_driver early_driver = { \ | ||
108 | .class_str = class_string, \ | ||
109 | .pdrv = platform_driver, \ | ||
110 | .requested_id = EARLY_PLATFORM_ID_UNSET, \ | ||
111 | }; \ | ||
112 | static int __init early_platform_driver_setup_func(char *buf) \ | ||
113 | { \ | ||
114 | return early_platform_driver_register(&early_driver, buf); \ | ||
115 | } \ | ||
116 | early_param(class_string, early_platform_driver_setup_func) | ||
117 | #else /* MODULE */ | ||
118 | #define early_platform_init(class_string, platform_driver) | ||
119 | #endif /* MODULE */ | ||
120 | |||
80 | #endif /* _PLATFORM_DEVICE_H_ */ | 121 | #endif /* _PLATFORM_DEVICE_H_ */ |