Skip to content

Commit

Permalink
rpmsg: Correct support for MODULE_DEVICE_TABLE()
Browse files Browse the repository at this point in the history
Due to missing a missing entry in file2alias.c MODULE_DEVICE_TABLE() are
not generating the proper module aliases. Add the needed entry here.

Fixes: bcabbcc ("rpmsg: add virtio-based remote processor messaging bus")
Reported-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Andrew F. Davis authored and Greg Kroah-Hartman committed May 14, 2018
1 parent 065c095 commit 5b7d127
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/mod/devicetable-offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ int main(void)
DEVID(hv_vmbus_device_id);
DEVID_FIELD(hv_vmbus_device_id, guid);

DEVID(rpmsg_device_id);
DEVID_FIELD(rpmsg_device_id, name);

DEVID(i2c_device_id);
DEVID_FIELD(i2c_device_id, name);

Expand Down
11 changes: 11 additions & 0 deletions scripts/mod/file2alias.c
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,17 @@ static int do_vmbus_entry(const char *filename, void *symval,
}
ADD_TO_DEVTABLE("vmbus", hv_vmbus_device_id, do_vmbus_entry);

/* Looks like: rpmsg:S */
static int do_rpmsg_entry(const char *filename, void *symval,
char *alias)
{
DEF_FIELD_ADDR(symval, rpmsg_device_id, name);
sprintf(alias, RPMSG_DEVICE_MODALIAS_FMT, *name);

return 1;
}
ADD_TO_DEVTABLE("rpmsg", rpmsg_device_id, do_rpmsg_entry);

/* Looks like: i2c:S */
static int do_i2c_entry(const char *filename, void *symval,
char *alias)
Expand Down

0 comments on commit 5b7d127

Please sign in to comment.