aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-10-20 10:51:28 +0200
committerTakashi Iwai <tiwai@suse.de>2015-10-20 10:52:05 +0200
commitc6deb07bf7f89c72bb5fbeef799b9afc6e4b236f (patch)
treebdb67d4d344c75eb3479e2b59e629100a55aef13
parent8b333b2651d04db046a693eac25b609bf175d720 (diff)
downloadhda-emu-c6deb07bf7f89c72bb5fbeef799b9afc6e4b236f.tar.gz
Fixes to adapt MODULE_DEVICE_TABLE() support in the upstream
The header linux/mod_devicetable.h is directly included from the kernel tree, so that struct hda_device_id definition can be moved around. For that, a few more type definitions, the additional uevent wrapper and some fixes in linux/dmi.h are needed, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--include/linux/device.h1
-rw-r--r--include/linux/dmi.h24
-rw-r--r--include/linux/mod_devicetable.h1
-rw-r--r--include/linux/module.h2
-rw-r--r--include/linux/sysfs.h7
-rw-r--r--include/wrapper.h3
6 files changed, 15 insertions, 23 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index a19a970..fded3e4 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -81,6 +81,7 @@ struct bus_type {
const char *name;
int (*match)(struct device *dev, struct device_driver *drv);
+ int (*uevent)(struct device *dev, struct kobj_uevent_env *env);
int (*probe)(struct device *dev);
int (*remove)(struct device *dev);
void (*shutdown)(struct device *dev);
diff --git a/include/linux/dmi.h b/include/linux/dmi.h
index c87189c..ea5565b 100644
--- a/include/linux/dmi.h
+++ b/include/linux/dmi.h
@@ -2,29 +2,7 @@
#define __LINUX_DMI_H
#include <linux/list.h>
-
-enum dmi_field {
- DMI_NONE,
- DMI_BIOS_VENDOR,
- DMI_BIOS_VERSION,
- DMI_BIOS_DATE,
- DMI_SYS_VENDOR,
- DMI_PRODUCT_NAME,
- DMI_PRODUCT_VERSION,
- DMI_PRODUCT_SERIAL,
- DMI_PRODUCT_UUID,
- DMI_BOARD_VENDOR,
- DMI_BOARD_NAME,
- DMI_BOARD_VERSION,
- DMI_BOARD_SERIAL,
- DMI_BOARD_ASSET_TAG,
- DMI_CHASSIS_VENDOR,
- DMI_CHASSIS_TYPE,
- DMI_CHASSIS_VERSION,
- DMI_CHASSIS_SERIAL,
- DMI_CHASSIS_ASSET_TAG,
- DMI_STRING_MAX,
-};
+#include <linux/mod_devicetable.h>
enum dmi_device_type {
DMI_DEV_TYPE_ANY = 0,
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
new file mode 100644
index 0000000..5d738ab
--- /dev/null
+++ b/include/linux/mod_devicetable.h
@@ -0,0 +1 @@
+#include "../../dist/include/linux/mod_devicetable.h"
diff --git a/include/linux/module.h b/include/linux/module.h
index 51c4c97..a264db4 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -28,4 +28,6 @@ static inline int try_module_get(struct module *x) { return 1; }
#define THIS_MODULE NULL
+#define MODULE_DEVICE_TABLE(type, x)
+
#endif /* __LINUX_MODULE_H */
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index 7bed68e..67de1f3 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -7,6 +7,7 @@
struct kobject;
struct kobj_type;
+struct kobj_uevent_env;
struct kobject {
char *name;
@@ -68,4 +69,10 @@ static inline int sysfs_create_group(struct kobject *kobj,
static inline void sysfs_remove_group(struct kobject *kobj,
const struct attribute_group *grp) {}
+static inline int add_uevent_var(struct kobj_uevent_env *env, const char *fmt,
+ ...)
+{
+ return 0;
+}
+
#endif /* __LINUX_SYSFS_H */
diff --git a/include/wrapper.h b/include/wrapper.h
index 5ed1674..726e13a 100644
--- a/include/wrapper.h
+++ b/include/wrapper.h
@@ -143,6 +143,9 @@ typedef _Bool bool;
typedef unsigned long dma_addr_t;
+typedef unsigned long kernel_ulong_t;
+typedef unsigned int uuid_le;
+
#define PAGE_SIZE 4096
#define __user