Skip to content

Commit

Permalink
can: m_can: make custom bittiming fields const
Browse files Browse the repository at this point in the history
commit ea22ba4 upstream.

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]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
tq-schifferm authored and gregkh committed Dec 22, 2021
1 parent 5b4641e commit 274f4b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/can/m_can/m_can.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ struct m_can_classdev {
struct sk_buff *tx_skb;
struct phy *transceiver;

struct can_bittiming_const *bit_timing;
struct can_bittiming_const *data_timing;
const struct can_bittiming_const *bit_timing;
const struct can_bittiming_const *data_timing;

struct m_can_ops *ops;

Expand Down

0 comments on commit 274f4b3

Please sign in to comment.