]> Pileus Git - ~andy/linux/blobdiff - scripts/mod/file2alias.c
Merge branch 'mainline' into upstream-linus
[~andy/linux] / scripts / mod / file2alias.c
index 44312926b84934f3b68e12e0bda278f3824cc4ed..de76da80443f757a8ed90ce4f27dd53e2ff2a8db 100644 (file)
@@ -265,6 +265,14 @@ static int do_ccw_entry(const char *filename,
        return 1;
 }
 
+/* looks like: "ap:tN" */
+static int do_ap_entry(const char *filename,
+                      struct ap_device_id *id, char *alias)
+{
+       sprintf(alias, "ap:t%02X", id->dev_type);
+       return 1;
+}
+
 /* Looks like: "serio:tyNprNidNexN" */
 static int do_serio_entry(const char *filename,
                          struct serio_device_id *id, char *alias)
@@ -391,7 +399,7 @@ static void do_input(char *alias,
        unsigned int i;
 
        for (i = min; i < max; i++)
-               if (arr[i / BITS_PER_LONG] & (1 << (i%BITS_PER_LONG)))
+               if (arr[i / BITS_PER_LONG] & (1L << (i%BITS_PER_LONG)))
                        sprintf(alias + strlen(alias), "%X,*", i);
 }
 
@@ -503,6 +511,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
                do_table(symval, sym->st_size,
                         sizeof(struct ccw_device_id), "ccw",
                         do_ccw_entry, mod);
+       else if (sym_is(symname, "__mod_ap_device_table"))
+               do_table(symval, sym->st_size,
+                        sizeof(struct ap_device_id), "ap",
+                        do_ap_entry, mod);
        else if (sym_is(symname, "__mod_serio_device_table"))
                do_table(symval, sym->st_size,
                         sizeof(struct serio_device_id), "serio",