can: peak_usb: pcan_usb_pro_encode_msg(): use macros for flags instead of plain integers

This patch replaces the plain integers used for flags in
pcan_usb_pro_encode_msg() by macros which are already defined.

Link: https://lore.kernel.org/r/20210309082128.23125-4-s.grosjean@peak-system.com
Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
[mkl: split into two patches]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
Stephane Grosjean 2021-03-09 09:21:28 +01:00 committed by Marc Kleine-Budde
parent 27868a8fc1
commit cfe2a4ca1e

View File

@ -776,9 +776,9 @@ static int pcan_usb_pro_encode_msg(struct peak_usb_device *dev,
flags = 0;
if (cf->can_id & CAN_EFF_FLAG)
flags |= 0x02;
flags |= PCAN_USBPRO_EXT;
if (cf->can_id & CAN_RTR_FLAG)
flags |= 0x01;
flags |= PCAN_USBPRO_RTR;
pcan_msg_add_rec(&usb_msg, data_type, 0, flags, len, cf->can_id,
cf->data);