summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorStephane Grosjean <s.grosjean@peak-system.com>2017-01-19 16:31:05 +0100
committerMarc Kleine-Budde <mkl@pengutronix.de>2017-04-25 09:00:44 +0200
commit113ab88b2b689b431904e1d753e20390529ed204 (patch)
treee4f87cbacb7a33b8abe92180e1a6af13ac5c1624 /drivers/net
parent81c5e13d90db1eb1bf326e5b1f6293a0d85e966d (diff)
downloadlinux-113ab88b2b689b431904e1d753e20390529ed204.tar.gz
linux-113ab88b2b689b431904e1d753e20390529ed204.tar.bz2
linux-113ab88b2b689b431904e1d753e20390529ed204.zip
can: peak: fix usage of const qualifier in pointers args
Fixes the usage of the const qualifier in the memory pointer arguments of the declared inline functions. By changing the line containing "const", this patch also changes the name of the arg into a more usual one. Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/can/usb/peak_usb/pcan_ucan.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/can/usb/peak_usb/pcan_ucan.h b/drivers/net/can/usb/peak_usb/pcan_ucan.h
index 104a4671452d..25e20ef2fef8 100644
--- a/drivers/net/can/usb/peak_usb/pcan_ucan.h
+++ b/drivers/net/can/usb/peak_usb/pcan_ucan.h
@@ -219,25 +219,25 @@ static inline __le16 pucan_cmd_opcode_channel(int index, int opcode)
}
/* return the channel number part from any received message channel_dlc field */
-static inline int pucan_msg_get_channel(struct pucan_rx_msg *rm)
+static inline int pucan_msg_get_channel(const struct pucan_rx_msg *msg)
{
- return rm->channel_dlc & 0xf;
+ return msg->channel_dlc & 0xf;
}
/* return the dlc value from any received message channel_dlc field */
-static inline int pucan_msg_get_dlc(struct pucan_rx_msg *rm)
+static inline int pucan_msg_get_dlc(const struct pucan_rx_msg *msg)
{
- return rm->channel_dlc >> 4;
+ return msg->channel_dlc >> 4;
}
-static inline int pucan_ermsg_get_channel(struct pucan_error_msg *em)
+static inline int pucan_ermsg_get_channel(const struct pucan_error_msg *msg)
{
- return em->channel_type_d & 0x0f;
+ return msg->channel_type_d & 0x0f;
}
-static inline int pucan_stmsg_get_channel(struct pucan_status_msg *sm)
+static inline int pucan_stmsg_get_channel(const struct pucan_status_msg *msg)
{
- return sm->channel_p_w_b & 0x0f;
+ return msg->channel_p_w_b & 0x0f;
}
#endif