Merge tag 'char-misc-5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregk...
[sfrench/cifs-2.6.git] / scripts / mod / file2alias.c
index d21d2871387bd1c272a0a50e241f8b975811fde6..7c97fa8e36bcd3b95ed942ee443c55db1b3d2085 100644 (file)
@@ -1397,6 +1397,18 @@ static int do_ssam_entry(const char *filename, void *symval, char *alias)
        return 1;
 }
 
+/* Looks like: dfl:tNfN */
+static int do_dfl_entry(const char *filename, void *symval, char *alias)
+{
+       DEF_FIELD(symval, dfl_device_id, type);
+       DEF_FIELD(symval, dfl_device_id, feature_id);
+
+       sprintf(alias, "dfl:t%04Xf%04X", type, feature_id);
+
+       add_wildcard(alias);
+       return 1;
+}
+
 /* Does namelen bytes of name exactly match the symbol? */
 static bool sym_is(const char *name, unsigned namelen, const char *symbol)
 {
@@ -1473,6 +1485,7 @@ static const struct devtable devtable[] = {
        {"mhi", SIZE_mhi_device_id, do_mhi_entry},
        {"auxiliary", SIZE_auxiliary_device_id, do_auxiliary_entry},
        {"ssam", SIZE_ssam_device_id, do_ssam_entry},
+       {"dfl", SIZE_dfl_device_id, do_dfl_entry},
 };
 
 /* Create MODULE_ALIAS() statements.