From: Jimmy Assarsson <jimmyassarsson@gmail.com>
To: linux-can@vger.kernel.org
Cc: Jimmy Assarsson <jimmyassarsson@gmail.com>
Subject: [PATCH v3 1/2] can: kvaser_usb: Simplify struct kvaser_msg_cardinfo
Date: Fri, 16 Feb 2018 14:21:24 +0100 [thread overview]
Message-ID: <20180216132125.13232-1-jimmyassarsson@gmail.com> (raw)
serial_number_high can be removed from the struct since it is never used in
the USBcan II firmware.
Signed-off-by: Jimmy Assarsson <jimmyassarsson@gmail.com>
---
Changes in v3:
- Change data type of ean, from u32 to __le32.
Changes in v2:
- Made this a separate patch.
drivers/net/can/usb/kvaser_usb.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/drivers/net/can/usb/kvaser_usb.c b/drivers/net/can/usb/kvaser_usb.c
index 63587b8e6825..3c17bb3b1588 100644
--- a/drivers/net/can/usb/kvaser_usb.c
+++ b/drivers/net/can/usb/kvaser_usb.c
@@ -196,19 +196,11 @@ struct kvaser_msg_simple {
struct kvaser_msg_cardinfo {
u8 tid;
u8 nchannels;
- union {
- struct {
- __le32 serial_number;
- __le32 padding;
- } __packed leaf0;
- struct {
- __le32 serial_number_low;
- __le32 serial_number_high;
- } __packed usbcan0;
- } __packed;
+ __le32 serial_number;
+ __le32 padding0;
__le32 clock_resolution;
__le32 mfgdate;
- u8 ean[8];
+ __le32 ean[2];
u8 hw_revision;
union {
struct {
@@ -218,7 +210,7 @@ struct kvaser_msg_cardinfo {
u8 padding;
} __packed usbcan1;
} __packed;
- __le16 padding;
+ __le16 padding1;
} __packed;
struct kvaser_msg_cardinfo2 {
--
2.16.1
next reply other threads:[~2018-02-16 13:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-16 13:21 Jimmy Assarsson [this message]
2018-02-16 13:21 ` [PATCH v3 2/2] can: kvaser_usb: Expose EAN and serial number via sysfs Jimmy Assarsson
2018-02-16 13:26 ` [PATCH v3 1/2] can: kvaser_usb: Simplify struct kvaser_msg_cardinfo Marc Kleine-Budde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180216132125.13232-1-jimmyassarsson@gmail.com \
--to=jimmyassarsson@gmail.com \
--cc=linux-can@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox