OSDN Git Service

tpm/tpm_ftpm_tee: Use UUID API for exporting the UUID
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 22 Apr 2020 13:01:35 +0000 (16:01 +0300)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Fri, 22 May 2020 15:50:12 +0000 (18:50 +0300)
There is export_uuid() function which exports uuid_t to the u8 array.
Use it instead of open coding variant.

This allows to hide the uuid_t internals.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
drivers/char/tpm/tpm_ftpm_tee.c

index 22bf553..2491a2c 100644 (file)
@@ -241,7 +241,7 @@ static int ftpm_tee_probe(struct platform_device *pdev)
 
        /* Open a session with fTPM TA */
        memset(&sess_arg, 0, sizeof(sess_arg));
-       memcpy(sess_arg.uuid, ftpm_ta_uuid.b, TEE_IOCTL_UUID_LEN);
+       export_uuid(sess_arg.uuid, &ftpm_ta_uuid);
        sess_arg.clnt_login = TEE_IOCTL_LOGIN_PUBLIC;
        sess_arg.num_params = 0;