summaryrefslogtreecommitdiffstats
path: root/drivers/thunderbolt
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-07-18 09:30:05 -0400
committerChristoph Hellwig <hch@lst.de>2017-07-24 11:50:18 -0400
commit7c39ffe7a821dfd1f801627e1813f7c025e4c918 (patch)
treeab6126e84a47930afe71f8d30df5eed9d030156f /drivers/thunderbolt
parentd9cf48416596717184b36d96c313311ad39dac05 (diff)
thunderbolt: use uuid_t instead of uuid_be
Switch thunderbolt to the new uuid type. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt')
-rw-r--r--drivers/thunderbolt/switch.c8
-rw-r--r--drivers/thunderbolt/tb.h4
-rw-r--r--drivers/thunderbolt/tb_msgs.h12
3 files changed, 12 insertions, 12 deletions
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c
index ab3e8f410444..c6f41b7d38b0 100644
--- a/drivers/thunderbolt/switch.c
+++ b/drivers/thunderbolt/switch.c
@@ -30,7 +30,7 @@ static DEFINE_IDA(nvm_ida);
30 30
31struct nvm_auth_status { 31struct nvm_auth_status {
32 struct list_head list; 32 struct list_head list;
33 uuid_be uuid; 33 uuid_t uuid;
34 u32 status; 34 u32 status;
35}; 35};
36 36
@@ -47,7 +47,7 @@ static struct nvm_auth_status *__nvm_get_auth_status(const struct tb_switch *sw)
47 struct nvm_auth_status *st; 47 struct nvm_auth_status *st;
48 48
49 list_for_each_entry(st, &nvm_auth_status_cache, list) { 49 list_for_each_entry(st, &nvm_auth_status_cache, list) {
50 if (!uuid_be_cmp(st->uuid, *sw->uuid)) 50 if (uuid_equal(&st->uuid, sw->uuid))
51 return st; 51 return st;
52 } 52 }
53 53
@@ -1460,7 +1460,7 @@ struct tb_sw_lookup {
1460 struct tb *tb; 1460 struct tb *tb;
1461 u8 link; 1461 u8 link;
1462 u8 depth; 1462 u8 depth;
1463 const uuid_be *uuid; 1463 const uuid_t *uuid;
1464}; 1464};
1465 1465
1466static int tb_switch_match(struct device *dev, void *data) 1466static int tb_switch_match(struct device *dev, void *data)
@@ -1517,7 +1517,7 @@ struct tb_switch *tb_switch_find_by_link_depth(struct tb *tb, u8 link, u8 depth)
1517 * Returned switch has reference count increased so the caller needs to 1517 * Returned switch has reference count increased so the caller needs to
1518 * call tb_switch_put() when done with the switch. 1518 * call tb_switch_put() when done with the switch.
1519 */ 1519 */
1520struct tb_switch *tb_switch_find_by_uuid(struct tb *tb, const uuid_be *uuid) 1520struct tb_switch *tb_switch_find_by_uuid(struct tb *tb, const uuid_t *uuid)
1521{ 1521{
1522 struct tb_sw_lookup lookup; 1522 struct tb_sw_lookup lookup;
1523 struct device *dev; 1523 struct device *dev;
diff --git a/drivers/thunderbolt/tb.h b/drivers/thunderbolt/tb.h
index 3d9f64676e58..e0deee4f1eb0 100644
--- a/drivers/thunderbolt/tb.h
+++ b/drivers/thunderbolt/tb.h
@@ -101,7 +101,7 @@ struct tb_switch {
101 struct tb_dma_port *dma_port; 101 struct tb_dma_port *dma_port;
102 struct tb *tb; 102 struct tb *tb;
103 u64 uid; 103 u64 uid;
104 uuid_be *uuid; 104 uuid_t *uuid;
105 u16 vendor; 105 u16 vendor;
106 u16 device; 106 u16 device;
107 const char *vendor_name; 107 const char *vendor_name;
@@ -407,7 +407,7 @@ void tb_sw_set_unplugged(struct tb_switch *sw);
407struct tb_switch *get_switch_at_route(struct tb_switch *sw, u64 route); 407struct tb_switch *get_switch_at_route(struct tb_switch *sw, u64 route);
408struct tb_switch *tb_switch_find_by_link_depth(struct tb *tb, u8 link, 408struct tb_switch *tb_switch_find_by_link_depth(struct tb *tb, u8 link,
409 u8 depth); 409 u8 depth);
410struct tb_switch *tb_switch_find_by_uuid(struct tb *tb, const uuid_be *uuid); 410struct tb_switch *tb_switch_find_by_uuid(struct tb *tb, const uuid_t *uuid);
411 411
412static inline unsigned int tb_switch_phy_port_from_link(unsigned int link) 412static inline unsigned int tb_switch_phy_port_from_link(unsigned int link)
413{ 413{
diff --git a/drivers/thunderbolt/tb_msgs.h b/drivers/thunderbolt/tb_msgs.h
index 85b6d33c0919..de6441e4a060 100644
--- a/drivers/thunderbolt/tb_msgs.h
+++ b/drivers/thunderbolt/tb_msgs.h
@@ -179,7 +179,7 @@ struct icm_fr_pkg_get_topology_response {
179 179
180struct icm_fr_event_device_connected { 180struct icm_fr_event_device_connected {
181 struct icm_pkg_header hdr; 181 struct icm_pkg_header hdr;
182 uuid_be ep_uuid; 182 uuid_t ep_uuid;
183 u8 connection_key; 183 u8 connection_key;
184 u8 connection_id; 184 u8 connection_id;
185 u16 link_info; 185 u16 link_info;
@@ -193,7 +193,7 @@ struct icm_fr_event_device_connected {
193 193
194struct icm_fr_pkg_approve_device { 194struct icm_fr_pkg_approve_device {
195 struct icm_pkg_header hdr; 195 struct icm_pkg_header hdr;
196 uuid_be ep_uuid; 196 uuid_t ep_uuid;
197 u8 connection_key; 197 u8 connection_key;
198 u8 connection_id; 198 u8 connection_id;
199 u16 reserved; 199 u16 reserved;
@@ -207,7 +207,7 @@ struct icm_fr_event_device_disconnected {
207 207
208struct icm_fr_pkg_add_device_key { 208struct icm_fr_pkg_add_device_key {
209 struct icm_pkg_header hdr; 209 struct icm_pkg_header hdr;
210 uuid_be ep_uuid; 210 uuid_t ep_uuid;
211 u8 connection_key; 211 u8 connection_key;
212 u8 connection_id; 212 u8 connection_id;
213 u16 reserved; 213 u16 reserved;
@@ -216,7 +216,7 @@ struct icm_fr_pkg_add_device_key {
216 216
217struct icm_fr_pkg_add_device_key_response { 217struct icm_fr_pkg_add_device_key_response {
218 struct icm_pkg_header hdr; 218 struct icm_pkg_header hdr;
219 uuid_be ep_uuid; 219 uuid_t ep_uuid;
220 u8 connection_key; 220 u8 connection_key;
221 u8 connection_id; 221 u8 connection_id;
222 u16 reserved; 222 u16 reserved;
@@ -224,7 +224,7 @@ struct icm_fr_pkg_add_device_key_response {
224 224
225struct icm_fr_pkg_challenge_device { 225struct icm_fr_pkg_challenge_device {
226 struct icm_pkg_header hdr; 226 struct icm_pkg_header hdr;
227 uuid_be ep_uuid; 227 uuid_t ep_uuid;
228 u8 connection_key; 228 u8 connection_key;
229 u8 connection_id; 229 u8 connection_id;
230 u16 reserved; 230 u16 reserved;
@@ -233,7 +233,7 @@ struct icm_fr_pkg_challenge_device {
233 233
234struct icm_fr_pkg_challenge_device_response { 234struct icm_fr_pkg_challenge_device_response {
235 struct icm_pkg_header hdr; 235 struct icm_pkg_header hdr;
236 uuid_be ep_uuid; 236 uuid_t ep_uuid;
237 u8 connection_key; 237 u8 connection_key;
238 u8 connection_id; 238 u8 connection_id;
239 u16 reserved; 239 u16 reserved;