can: etas_es58x: replace es58x_device::rx_max_packet_size by usb_maxpacket()
authorVincent Mailhol <mailhol.vincent@wanadoo.fr>
Sat, 11 Jun 2022 16:20:36 +0000 (01:20 +0900)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Sat, 11 Jun 2022 20:45:48 +0000 (22:45 +0200)
commit173d349ba0b785305fde42a67ce66a63417e57da
tree05a0dad9c6a04356fffd35ce052bc4ea2c9f9a63
parenta9cf02c6a671bc84a348cd5934627ff68d8d8d35
can: etas_es58x: replace es58x_device::rx_max_packet_size by usb_maxpacket()

The field rx_max_packet_size of struct es58x_device in nothing else
than usb_endpoint_descriptor::wMaxPacketSize and can be easily
retrieved using usb_maxpacket(). Also, rx_max_packet_size being used a
single time, there is no merit to cache it locally.

Remove es58x_device::rx_max_packet_size and rely on usb_maxpacket()
instead.

Link: https://lore.kernel.org/all/20220611162037.1507-2-mailhol.vincent@wanadoo.fr
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/etas_es58x/es58x_core.c
drivers/net/can/usb/etas_es58x/es58x_core.h