phy: miphy365x: Fix off-by-one error
authorLee Jones <lee.jones@linaro.org>
Thu, 28 Aug 2014 13:59:50 +0000 (14:59 +0100)
committerKishon Vijay Abraham I <kishon@ti.com>
Fri, 12 Sep 2014 06:05:31 +0000 (11:35 +0530)
commita6cc1b9478e769aca95d3a1bcb071d38b3f6bc30
tree2c695c33859019ecbdf77026bf6c5602fbe1b17e
parentfbb1a770039d3900f5130bab949b757f6f7fb373
phy: miphy365x: Fix off-by-one error

We index the RX/TX speed select values in the following way:

  rx_tx_spd[miphy_phy->sata_gen];

However rx_tx_spd[] starts at index zero and the SATA_GENx's start
at one.  In this patch we pad out the first element in rx_tx_spd[]
in an attempt to realign the values.

Cc: Alexandre Torgue <alexandre.torgue@st.com>
Reported-by: Gabriel Fernandez <gabriel.fernandez@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/phy-miphy365x.c