diff options
author | Stuart Yoder <stuart.yoder@nxp.com> | 2016-06-22 17:40:45 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-26 20:14:03 -0400 |
commit | 0afef45654ae908536278ecb143ded5bbc713391 (patch) | |
tree | 8f1ce0a2ad4a69fdd08426c6cf861b4c6adbc8c7 /scripts/mod/file2alias.c | |
parent | 57538afb42e492eb6984f89663361bcfd80d9745 (diff) |
staging: fsl-mc: add support for device table matching
Move the definition of fsl_mc_device_id to its proper location in
mod_devicetable.h, and add fsl-mc bus support to devicetable-offsets.c
and file2alias.c to enable device table matching. With this patch udev
based module loading of fsl-mc drivers is supported.
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/mod/file2alias.c')
-rw-r--r-- | scripts/mod/file2alias.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index fec75786f75b..29d6699d5a06 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
@@ -1289,6 +1289,18 @@ static int do_hda_entry(const char *filename, void *symval, char *alias) | |||
1289 | } | 1289 | } |
1290 | ADD_TO_DEVTABLE("hdaudio", hda_device_id, do_hda_entry); | 1290 | ADD_TO_DEVTABLE("hdaudio", hda_device_id, do_hda_entry); |
1291 | 1291 | ||
1292 | /* Looks like: fsl-mc:vNdN */ | ||
1293 | static int do_fsl_mc_entry(const char *filename, void *symval, | ||
1294 | char *alias) | ||
1295 | { | ||
1296 | DEF_FIELD(symval, fsl_mc_device_id, vendor); | ||
1297 | DEF_FIELD_ADDR(symval, fsl_mc_device_id, obj_type); | ||
1298 | |||
1299 | sprintf(alias, "fsl-mc:v%08Xd%s", vendor, *obj_type); | ||
1300 | return 1; | ||
1301 | } | ||
1302 | ADD_TO_DEVTABLE("fslmc", fsl_mc_device_id, do_fsl_mc_entry); | ||
1303 | |||
1292 | /* Does namelen bytes of name exactly match the symbol? */ | 1304 | /* Does namelen bytes of name exactly match the symbol? */ |
1293 | static bool sym_is(const char *name, unsigned namelen, const char *symbol) | 1305 | static bool sym_is(const char *name, unsigned namelen, const char *symbol) |
1294 | { | 1306 | { |