Skip to content

Commit 5b7d127

Browse files
glneogregkh
authored andcommitted
rpmsg: Correct support for MODULE_DEVICE_TABLE()
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 <[email protected]> Signed-off-by: Andrew F. Davis <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 065c095 commit 5b7d127

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

scripts/mod/devicetable-offsets.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ int main(void)
139139
DEVID(hv_vmbus_device_id);
140140
DEVID_FIELD(hv_vmbus_device_id, guid);
141141

142+
DEVID(rpmsg_device_id);
143+
DEVID_FIELD(rpmsg_device_id, name);
144+
142145
DEVID(i2c_device_id);
143146
DEVID_FIELD(i2c_device_id, name);
144147

scripts/mod/file2alias.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,17 @@ static int do_vmbus_entry(const char *filename, void *symval,
944944
}
945945
ADD_TO_DEVTABLE("vmbus", hv_vmbus_device_id, do_vmbus_entry);
946946

947+
/* Looks like: rpmsg:S */
948+
static int do_rpmsg_entry(const char *filename, void *symval,
949+
char *alias)
950+
{
951+
DEF_FIELD_ADDR(symval, rpmsg_device_id, name);
952+
sprintf(alias, RPMSG_DEVICE_MODALIAS_FMT, *name);
953+
954+
return 1;
955+
}
956+
ADD_TO_DEVTABLE("rpmsg", rpmsg_device_id, do_rpmsg_entry);
957+
947958
/* Looks like: i2c:S */
948959
static int do_i2c_entry(const char *filename, void *symval,
949960
char *alias)

0 commit comments

Comments
 (0)