Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

platform/surface: dtx: Use target-ID enum instead of hard-coding values

Instead of hard-coding the target ID, use the respective enum
ssam_ssh_tid value.

Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Link: https://lore.kernel.org/r/20221202223327.690880-7-luzmaximilian@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>

authored by

Maximilian Luz and committed by
Hans de Goede
1e6201d9 36f672a4

+9 -9
+9 -9
drivers/platform/surface/surface_dtx.c
··· 71 71 72 72 SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_lock, { 73 73 .target_category = SSAM_SSH_TC_BAS, 74 - .target_id = 0x01, 74 + .target_id = SSAM_SSH_TID_SAM, 75 75 .command_id = 0x06, 76 76 .instance_id = 0x00, 77 77 }); 78 78 79 79 SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_unlock, { 80 80 .target_category = SSAM_SSH_TC_BAS, 81 - .target_id = 0x01, 81 + .target_id = SSAM_SSH_TID_SAM, 82 82 .command_id = 0x07, 83 83 .instance_id = 0x00, 84 84 }); 85 85 86 86 SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_request, { 87 87 .target_category = SSAM_SSH_TC_BAS, 88 - .target_id = 0x01, 88 + .target_id = SSAM_SSH_TID_SAM, 89 89 .command_id = 0x08, 90 90 .instance_id = 0x00, 91 91 }); 92 92 93 93 SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_confirm, { 94 94 .target_category = SSAM_SSH_TC_BAS, 95 - .target_id = 0x01, 95 + .target_id = SSAM_SSH_TID_SAM, 96 96 .command_id = 0x09, 97 97 .instance_id = 0x00, 98 98 }); 99 99 100 100 SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_heartbeat, { 101 101 .target_category = SSAM_SSH_TC_BAS, 102 - .target_id = 0x01, 102 + .target_id = SSAM_SSH_TID_SAM, 103 103 .command_id = 0x0a, 104 104 .instance_id = 0x00, 105 105 }); 106 106 107 107 SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_cancel, { 108 108 .target_category = SSAM_SSH_TC_BAS, 109 - .target_id = 0x01, 109 + .target_id = SSAM_SSH_TID_SAM, 110 110 .command_id = 0x0b, 111 111 .instance_id = 0x00, 112 112 }); 113 113 114 114 SSAM_DEFINE_SYNC_REQUEST_R(ssam_bas_get_base, struct ssam_bas_base_info, { 115 115 .target_category = SSAM_SSH_TC_BAS, 116 - .target_id = 0x01, 116 + .target_id = SSAM_SSH_TID_SAM, 117 117 .command_id = 0x0c, 118 118 .instance_id = 0x00, 119 119 }); 120 120 121 121 SSAM_DEFINE_SYNC_REQUEST_R(ssam_bas_get_device_mode, u8, { 122 122 .target_category = SSAM_SSH_TC_BAS, 123 - .target_id = 0x01, 123 + .target_id = SSAM_SSH_TID_SAM, 124 124 .command_id = 0x0d, 125 125 .instance_id = 0x00, 126 126 }); 127 127 128 128 SSAM_DEFINE_SYNC_REQUEST_R(ssam_bas_get_latch_status, u8, { 129 129 .target_category = SSAM_SSH_TC_BAS, 130 - .target_id = 0x01, 130 + .target_id = SSAM_SSH_TID_SAM, 131 131 .command_id = 0x11, 132 132 .instance_id = 0x00, 133 133 });