diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-12-05 01:10:01 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-12-05 01:10:01 +0100 |
commit | fcc9b50e5517f7d65cdc33d81f223b22536f863f (patch) | |
tree | 57004fbd4f29fe5ac07df3d4cfdaa0bfd6d18fbc /drivers/greybus | |
parent | greybus: gb-beagleplay: Ensure le for values in transport (diff) | |
download | linux-fcc9b50e5517f7d65cdc33d81f223b22536f863f.tar.xz linux-fcc9b50e5517f7d65cdc33d81f223b22536f863f.zip |
Revert "greybus: gb-beagleplay: Ensure le for values in transport"
This reverts commit 52eb67861ebeb2110318bd9fe33d85ddcf92aac7.
Turns out to not be correct, a new version will be generated later.
Link: https://lore.kernel.org/r/20231204131008.384583-1-ayushdevel1325@gmail.com
Cc: Ayush Singh <ayushdevel1325@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/greybus')
-rw-r--r-- | drivers/greybus/gb-beagleplay.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/greybus/gb-beagleplay.c b/drivers/greybus/gb-beagleplay.c index 1e70ff7e3da4..43318c1993ba 100644 --- a/drivers/greybus/gb-beagleplay.c +++ b/drivers/greybus/gb-beagleplay.c @@ -93,9 +93,9 @@ static void hdlc_rx_greybus_frame(struct gb_beagleplay *bg, u8 *buf, u16 len) memcpy(&cport_id, hdr->pad, sizeof(cport_id)); dev_dbg(&bg->sd->dev, "Greybus Operation %u type %X cport %u status %u received", - hdr->operation_id, hdr->type, le16_to_cpu(cport_id), hdr->result); + hdr->operation_id, hdr->type, cport_id, hdr->result); - greybus_data_rcvd(bg->gb_hd, le16_to_cpu(cport_id), buf, len); + greybus_data_rcvd(bg->gb_hd, cport_id, buf, len); } 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 { struct gb_beagleplay *bg = dev_get_drvdata(&hd->dev); struct hdlc_payload payloads[2]; - __le16 cport_id = le16_to_cpu(cport); dev_dbg(&hd->dev, "Sending greybus message with Operation %u, Type: %X on Cport %u", msg->header->operation_id, msg->header->type, cport); - if (le16_to_cpu(msg->header->size) > RX_HDLC_PAYLOAD) + if (msg->header->size > RX_HDLC_PAYLOAD) return dev_err_probe(&hd->dev, -E2BIG, "Greybus message too big"); - memcpy(msg->header->pad, &cport_id, sizeof(cport_id)); + memcpy(msg->header->pad, &cport, sizeof(cport)); payloads[0].buf = msg->header; payloads[0].len = sizeof(*msg->header); |