summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2011-08-29 08:47:46 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-29 08:47:46 -0700
commit6eafa4604cfa109a89524d35d93df11c37bd66b0 (patch)
treede0eddca052ed01318df559d7cd80211dd57a0fd /scripts
parentc6a389f123b9f68d605bb7e0f9b32ec1e3e14132 (diff)
parentb9c4decbd9530b0c4c6dc4ad0626af628b79cd53 (diff)
downloadlinux-6eafa4604cfa109a89524d35d93df11c37bd66b0.tar.bz2
Merge 3.1-rc4 into staging-next
This resolves a conflict with: drivers/staging/brcm80211/brcmsmac/types.h Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mod/file2alias.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index e26e2fb462d4..f936d1fa969d 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -735,6 +735,27 @@ static int do_virtio_entry(const char *filename, struct virtio_device_id *id,
return 1;
}
+/*
+ * Looks like: vmbus:guid
+ * Each byte of the guid will be represented by two hex characters
+ * in the name.
+ */
+
+static int do_vmbus_entry(const char *filename, struct hv_vmbus_device_id *id,
+ char *alias)
+{
+ int i;
+ char guid_name[((sizeof(id->guid) + 1)) * 2];
+
+ for (i = 0; i < (sizeof(id->guid) * 2); i += 2)
+ sprintf(&guid_name[i], "%02x", id->guid[i/2]);
+
+ strcpy(alias, "vmbus:");
+ strcat(alias, guid_name);
+
+ return 1;
+}
+
/* Looks like: i2c:S */
static int do_i2c_entry(const char *filename, struct i2c_device_id *id,
char *alias)
@@ -994,6 +1015,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
do_table(symval, sym->st_size,
sizeof(struct virtio_device_id), "virtio",
do_virtio_entry, mod);
+ else if (sym_is(symname, "__mod_vmbus_device_table"))
+ do_table(symval, sym->st_size,
+ sizeof(struct hv_vmbus_device_id), "vmbus",
+ do_vmbus_entry, mod);
else if (sym_is(symname, "__mod_i2c_device_table"))
do_table(symval, sym->st_size,
sizeof(struct i2c_device_id), "i2c",