summaryrefslogtreecommitdiff
path: root/include/linux/platform_device.h
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-02-11 00:55:28 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2010-02-11 00:55:28 (GMT)
commit84abd88a70090cf00f9e45c3a81680874f17626e (patch)
tree4f58b80057f6e1f5817af1dc33a5458b3dfc9a99 /include/linux/platform_device.h
parent13ca0fcaa33f6b1984c4111b6ec5df42689fea6f (diff)
parente28cab42f384745c8a947a9ccd51e4aae52f5d51 (diff)
downloadlinux-fsl-qoriq-84abd88a70090cf00f9e45c3a81680874f17626e.tar.xz
Merge remote branch 'linus/master' into x86/bootmem
Diffstat (limited to 'include/linux/platform_device.h')
-rw-r--r--include/linux/platform_device.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h
index 3c6675c..71ff887 100644
--- a/include/linux/platform_device.h
+++ b/include/linux/platform_device.h
@@ -83,6 +83,8 @@ struct early_platform_driver {
struct platform_driver *pdrv;
struct list_head list;
int requested_id;
+ char *buffer;
+ int bufsize;
};
#define EARLY_PLATFORM_ID_UNSET -2
@@ -102,21 +104,29 @@ extern int early_platform_driver_probe(char *class_str,
int nr_probe, int user_only);
extern void early_platform_cleanup(void);
+#define early_platform_init(class_string, platdrv) \
+ early_platform_init_buffer(class_string, platdrv, NULL, 0)
#ifndef MODULE
-#define early_platform_init(class_string, platform_driver) \
+#define early_platform_init_buffer(class_string, platdrv, buf, bufsiz) \
static __initdata struct early_platform_driver early_driver = { \
.class_str = class_string, \
- .pdrv = platform_driver, \
+ .buffer = buf, \
+ .bufsize = bufsiz, \
+ .pdrv = platdrv, \
.requested_id = EARLY_PLATFORM_ID_UNSET, \
}; \
-static int __init early_platform_driver_setup_func(char *buf) \
+static int __init early_platform_driver_setup_func(char *buffer) \
{ \
- return early_platform_driver_register(&early_driver, buf); \
+ return early_platform_driver_register(&early_driver, buffer); \
} \
early_param(class_string, early_platform_driver_setup_func)
#else /* MODULE */
-#define early_platform_init(class_string, platform_driver)
+#define early_platform_init_buffer(class_string, platdrv, buf, bufsiz) \
+static inline char *early_platform_driver_setup_func(void) \
+{ \
+ return bufsiz ? buf : NULL; \
+}
#endif /* MODULE */
#endif /* _PLATFORM_DEVICE_H_ */