Skip to content

Commit 8ef426e

Browse files
Frank Jungclausmarckleinebudde
authored andcommitted
can: esd_usb: Prefix all structures with the device name
Prefix all the structures with the device name. For commonly used structures make use of (the module name) esd_usb_. For esd CAN-USB/2 and CAN-USB/Micro specific structures use esd_usb_2_ and esd_usb_m. Link: https://lore.kernel.org/all/CAMZ6RqLaDNy-fZ2G0+QMhUEckkXLL+ZyELVSDFmqpd++aBzZQg@mail.gmail.com/ Suggested-by: Vincent MAILHOL <[email protected]> Signed-off-by: Frank Jungclaus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
1 parent 9dc3a69 commit 8ef426e

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

drivers/net/can/usb/esd_usb.c

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -89,21 +89,21 @@ MODULE_LICENSE("GPL v2");
8989
#define ESD_USB_MAX_RX_URBS 4
9090
#define ESD_USB_MAX_TX_URBS 16 /* must be power of 2 */
9191

92-
struct header_msg {
92+
struct esd_usb_header_msg {
9393
u8 len; /* len is always the total message length in 32bit words */
9494
u8 cmd;
9595
u8 rsvd[2];
9696
};
9797

98-
struct version_msg {
98+
struct esd_usb_version_msg {
9999
u8 len;
100100
u8 cmd;
101101
u8 rsvd;
102102
u8 flags;
103103
__le32 drv_version;
104104
};
105105

106-
struct version_reply_msg {
106+
struct esd_usb_version_reply_msg {
107107
u8 len;
108108
u8 cmd;
109109
u8 nets;
@@ -114,7 +114,7 @@ struct version_reply_msg {
114114
__le32 ts;
115115
};
116116

117-
struct rx_msg {
117+
struct esd_usb_rx_msg {
118118
u8 len;
119119
u8 cmd;
120120
u8 net;
@@ -132,7 +132,7 @@ struct rx_msg {
132132
};
133133
};
134134

135-
struct tx_msg {
135+
struct esd_usb_tx_msg {
136136
u8 len;
137137
u8 cmd;
138138
u8 net;
@@ -142,7 +142,7 @@ struct tx_msg {
142142
u8 data[CAN_MAX_DLEN];
143143
};
144144

145-
struct tx_done_msg {
145+
struct esd_usb_tx_done_msg {
146146
u8 len;
147147
u8 cmd;
148148
u8 net;
@@ -151,15 +151,15 @@ struct tx_done_msg {
151151
__le32 ts;
152152
};
153153

154-
struct id_filter_msg {
154+
struct esd_usb_id_filter_msg {
155155
u8 len;
156156
u8 cmd;
157157
u8 net;
158158
u8 option;
159159
__le32 mask[ESD_USB_MAX_ID_SEGMENT + 1];
160160
};
161161

162-
struct set_baudrate_msg {
162+
struct esd_usb_set_baudrate_msg {
163163
u8 len;
164164
u8 cmd;
165165
u8 net;
@@ -169,14 +169,14 @@ struct set_baudrate_msg {
169169

170170
/* Main message type used between library and application */
171171
union __packed esd_usb_msg {
172-
struct header_msg hdr;
173-
struct version_msg version;
174-
struct version_reply_msg version_reply;
175-
struct rx_msg rx;
176-
struct tx_msg tx;
177-
struct tx_done_msg txdone;
178-
struct set_baudrate_msg setbaud;
179-
struct id_filter_msg filter;
172+
struct esd_usb_header_msg hdr;
173+
struct esd_usb_version_msg version;
174+
struct esd_usb_version_reply_msg version_reply;
175+
struct esd_usb_rx_msg rx;
176+
struct esd_usb_tx_msg tx;
177+
struct esd_usb_tx_done_msg txdone;
178+
struct esd_usb_set_baudrate_msg setbaud;
179+
struct esd_usb_id_filter_msg filter;
180180
};
181181

182182
static struct usb_device_id esd_usb_table[] = {
@@ -899,8 +899,8 @@ static const struct ethtool_ops esd_usb_ethtool_ops = {
899899
.get_ts_info = ethtool_op_get_ts_info,
900900
};
901901

902-
static const struct can_bittiming_const esd_usb2_bittiming_const = {
903-
.name = "esd_usb2",
902+
static const struct can_bittiming_const esd_usb_2_bittiming_const = {
903+
.name = "esd_usb_2",
904904
.tseg1_min = 1,
905905
.tseg1_max = 16,
906906
.tseg2_min = 1,
@@ -911,9 +911,9 @@ static const struct can_bittiming_const esd_usb2_bittiming_const = {
911911
.brp_inc = 1,
912912
};
913913

914-
static int esd_usb2_set_bittiming(struct net_device *netdev)
914+
static int esd_usb_2_set_bittiming(struct net_device *netdev)
915915
{
916-
const struct can_bittiming_const *btc = &esd_usb2_bittiming_const;
916+
const struct can_bittiming_const *btc = &esd_usb_2_bittiming_const;
917917
struct esd_usb_net_priv *priv = netdev_priv(netdev);
918918
struct can_bittiming *bt = &priv->can.bittiming;
919919
union esd_usb_msg *msg;
@@ -1026,8 +1026,8 @@ static int esd_usb_probe_one_net(struct usb_interface *intf, int index)
10261026
priv->can.ctrlmode_supported |= CAN_CTRLMODE_3_SAMPLES;
10271027
}
10281028

1029-
priv->can.bittiming_const = &esd_usb2_bittiming_const;
1030-
priv->can.do_set_bittiming = esd_usb2_set_bittiming;
1029+
priv->can.bittiming_const = &esd_usb_2_bittiming_const;
1030+
priv->can.do_set_bittiming = esd_usb_2_set_bittiming;
10311031
priv->can.do_set_mode = esd_usb_set_mode;
10321032
priv->can.do_get_berr_counter = esd_usb_get_berr_counter;
10331033

0 commit comments

Comments
 (0)