mei: bus: add client protocol version to the device alias
The device alias now looks like mei:S:uuid:N:* In that way we can bind different drivers to clients with different protocol versions if required. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
40b7320ee4
commit
b26864cad1
@@ -185,6 +185,7 @@ int main(void)
|
||||
DEVID(mei_cl_device_id);
|
||||
DEVID_FIELD(mei_cl_device_id, name);
|
||||
DEVID_FIELD(mei_cl_device_id, uuid);
|
||||
DEVID_FIELD(mei_cl_device_id, version);
|
||||
|
||||
DEVID(rio_device_id);
|
||||
DEVID_FIELD(rio_device_id, did);
|
||||
|
@@ -1202,16 +1202,18 @@ static int do_cpu_entry(const char *filename, void *symval, char *alias)
|
||||
}
|
||||
ADD_TO_DEVTABLE("cpu", cpu_feature, do_cpu_entry);
|
||||
|
||||
/* Looks like: mei:S:uuid */
|
||||
/* Looks like: mei:S:uuid:N:* */
|
||||
static int do_mei_entry(const char *filename, void *symval,
|
||||
char *alias)
|
||||
{
|
||||
DEF_FIELD_ADDR(symval, mei_cl_device_id, name);
|
||||
DEF_FIELD_ADDR(symval, mei_cl_device_id, uuid);
|
||||
DEF_FIELD(symval, mei_cl_device_id, version);
|
||||
|
||||
sprintf(alias, MEI_CL_MODULE_PREFIX);
|
||||
sprintf(alias + strlen(alias), "%s:", (*name)[0] ? *name : "*");
|
||||
add_uuid(alias, *uuid);
|
||||
ADD(alias, ":", version != MEI_CL_VERSION_ANY, version);
|
||||
|
||||
strcat(alias, ":*");
|
||||
|
||||
|
Reference in New Issue
Block a user