can: esd_usb: Make use of existing kernel macros
authorFrank Jungclaus <frank.jungclaus@esd.eu>
Fri, 19 May 2023 19:55:55 +0000 (21:55 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 22 May 2023 18:22:53 +0000 (20:22 +0200)
commit1ad549cf980c0967497572c49f4f99eed7c500b8
tree1b6d4a7258b72264c67b788f8f77044595f370c1
parentd7588f02e8d8a795702cf06cbbb4303c48b02a61
can: esd_usb: Make use of existing kernel macros

Make use of existing kernel macros:
- Use the unit suffixes from linux/units.h for the controller clock
frequencies
- Use the BIT() and the GENMASK() macro to set specific bits in some
  constants
- Use CAN_MAX_DLEN (instead of directly using the value 8) for the
maximum CAN payload length

Additionally:
- Spend some commenting for the previously changed constants
- Add the current year to the copyright notice
- While adding the header linux/units.h to the list of include files
also sort that list alphabetically

Suggested-by: Vincent MAILHOL <mailhol.vincent@wanadoo.fr>
Link: https://lore.kernel.org/all/CAMZ6RqLaDNy-fZ2G0+QMhUEckkXLL+ZyELVSDFmqpd++aBzZQg@mail.gmail.com/
Link: https://lore.kernel.org/all/CAMZ6RqKdg5YBufa0C+ttzJvoG=9yuti-8AmthCi4jBbd08JEtw@mail.gmail.com/
Suggested-by: Marc Kleine-Budde <mkl@pengutronix.de>
Link: https://lore.kernel.org/all/20230518-grower-film-ea8b5f853f3e-mkl@pengutronix.de/
Signed-off-by: Frank Jungclaus <frank.jungclaus@esd.eu>
Link: https://lore.kernel.org/r/20230519195600.420644-2-frank.jungclaus@esd.eu
[mkl: remove hex constants in comments after BIT()]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/esd_usb.c