spi: Limit the spi device max speed to controller's max speed
authorTudor Ambarus <tudor.ambarus@microchip.com>
Wed, 9 Dec 2020 17:35:14 +0000 (19:35 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 11 Dec 2020 13:21:36 +0000 (13:21 +0000)
commit9326e4f1e5dd1a4410c429638d3c412b6fc17040
tree8aecb1d047b1df2abbfa1ef323d2a724a6a61c77
parente748edd9841306908b4e02dddd0afd1aa1f8b973
spi: Limit the spi device max speed to controller's max speed

Make sure the max_speed_hz of spi_device does not override
the max_speed_hz of controller.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Link: https://lore.kernel.org/r/20201209173514.93328-1-tudor.ambarus@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c