spi: amd: Fix speed selection
authorShreeya Patel <shreeya.patel@collabora.com>
Tue, 30 Aug 2022 09:36:07 +0000 (15:06 +0530)
committerMark Brown <broonie@kernel.org>
Tue, 30 Aug 2022 10:21:34 +0000 (11:21 +0100)
commit9477420efc41f60f06413cefa38f5bfd71ba64d8
tree36dddb2138c8cbd758291138d19a35e61f57021c
parentf4d381038700361f92d157288b0e18d87fab6c6d
spi: amd: Fix speed selection

If the current speed is equal to the requested speed by the device
then return success.
This patch fixes a bug introduced by the commit 3fe26121dc3a
("spi: amd: Configure device speed") which checks speed_hz instead
of amd_spi->speed_hz.

Fixes: 3fe26121dc3a ("spi: amd: Configure device speed")
Signed-off-by: Shreeya Patel <shreeya.patel@collabora.com>
Link: https://lore.kernel.org/r/20220830093607.45484-1-shreeya.patel@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-amd.c