Commit cfe2a4ca authored by Stephane Grosjean's avatar Stephane Grosjean Committed by Marc Kleine-Budde
Browse files

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: default avatarStephane Grosjean <s.grosjean@peak-system.com>
[mkl: split into two patches]
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 27868a8f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);