Skip to content

Commit ea22ba4

Browse files
tq-schiffermmarckleinebudde
authored andcommitted
can: m_can: make custom bittiming fields const
The assigned timing structs will be defined a const anyway, so we can avoid a few casts by declaring the struct fields as const as well. Link: https://lore.kernel.org/all/4508fa4e639164b2584c49a065d90c78a91fa568.1636967198.git.matthias.schiffer@ew.tq-group.com Signed-off-by: Matthias Schiffer <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]>
1 parent ea768b2 commit ea22ba4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/can/m_can/m_can.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ struct m_can_classdev {
8585
struct sk_buff *tx_skb;
8686
struct phy *transceiver;
8787

88-
struct can_bittiming_const *bit_timing;
89-
struct can_bittiming_const *data_timing;
88+
const struct can_bittiming_const *bit_timing;
89+
const struct can_bittiming_const *data_timing;
9090

9191
struct m_can_ops *ops;
9292

0 commit comments

Comments
 (0)