@@ -93,9 +93,9 @@ static void hdlc_rx_greybus_frame(struct gb_beagleplay *bg, u8 *buf, u16 len)
93
93
memcpy (& cport_id , hdr -> pad , sizeof (cport_id ));
94
94
95
95
dev_dbg (& bg -> sd -> dev , "Greybus Operation %u type %X cport %u status %u received" ,
96
- hdr -> operation_id , hdr -> type , le16_to_cpu ( cport_id ) , hdr -> result );
96
+ hdr -> operation_id , hdr -> type , cport_id , hdr -> result );
97
97
98
- greybus_data_rcvd (bg -> gb_hd , le16_to_cpu ( cport_id ) , buf , len );
98
+ greybus_data_rcvd (bg -> gb_hd , cport_id , buf , len );
99
99
}
100
100
101
101
static void hdlc_rx_dbg_frame (const struct gb_beagleplay * bg , const char * buf , u16 len )
@@ -340,15 +340,14 @@ static int gb_message_send(struct gb_host_device *hd, u16 cport, struct gb_messa
340
340
{
341
341
struct gb_beagleplay * bg = dev_get_drvdata (& hd -> dev );
342
342
struct hdlc_payload payloads [2 ];
343
- __le16 cport_id = le16_to_cpu (cport );
344
343
345
344
dev_dbg (& hd -> dev , "Sending greybus message with Operation %u, Type: %X on Cport %u" ,
346
345
msg -> header -> operation_id , msg -> header -> type , cport );
347
346
348
- if (le16_to_cpu ( msg -> header -> size ) > RX_HDLC_PAYLOAD )
347
+ if (msg -> header -> size > RX_HDLC_PAYLOAD )
349
348
return dev_err_probe (& hd -> dev , - E2BIG , "Greybus message too big" );
350
349
351
- memcpy (msg -> header -> pad , & cport_id , sizeof (cport_id ));
350
+ memcpy (msg -> header -> pad , & cport , sizeof (cport ));
352
351
353
352
payloads [0 ].buf = msg -> header ;
354
353
payloads [0 ].len = sizeof (* msg -> header );
0 commit comments