Commit ac3f2582 authored by Marc Kleine-Budde's avatar Marc Kleine-Budde

can: gs_usb: gs_can_open(): merge setting of timestamp flags and init

Merge the bodies of 2 consecutive "if (dev->feature &
GS_CAN_FEATURE_HW_TIMESTAMP)" statements.

Link: https://lore.kernel.org/all/20221019221016.1659260-4-mkl@pengutronix.deSigned-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent f6adf410
......@@ -923,12 +923,12 @@ static int gs_can_open(struct net_device *netdev)
flags |= GS_CAN_MODE_FD;
/* if hardware supports timestamps, enable it */
if (dev->feature & GS_CAN_FEATURE_HW_TIMESTAMP)
if (dev->feature & GS_CAN_FEATURE_HW_TIMESTAMP) {
flags |= GS_CAN_MODE_HW_TIMESTAMP;
/* start polling timestamp */
if (dev->feature & GS_CAN_FEATURE_HW_TIMESTAMP)
/* start polling timestamp */
gs_usb_timestamp_init(dev);
}
/* finally start device */
dev->can.state = CAN_STATE_ERROR_ACTIVE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment