diff options
Diffstat (limited to 'drivers/ata/ahci_dm816.c')
-rw-r--r-- | drivers/ata/ahci_dm816.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ata/ahci_dm816.c b/drivers/ata/ahci_dm816.c index 8bec41041671..d26efcd20f64 100644 --- a/drivers/ata/ahci_dm816.c +++ b/drivers/ata/ahci_dm816.c @@ -69,12 +69,12 @@ static int ahci_dm816_phy_init(struct ahci_host_priv *hpriv, struct device *dev) * keep-alive clock and the external reference clock. We need the * rate of the latter to calculate the correct value of MPY bits. */ - if (!hpriv->clks[1]) { + if (hpriv->n_clks < 2) { dev_err(dev, "reference clock not supplied\n"); return -EINVAL; } - refclk_rate = clk_get_rate(hpriv->clks[1]); + refclk_rate = clk_get_rate(hpriv->clks[1].clk); if ((refclk_rate % 100) != 0) { dev_err(dev, "reference clock rate must be divisible by 100\n"); return -EINVAL; @@ -176,7 +176,7 @@ static SIMPLE_DEV_PM_OPS(ahci_dm816_pm_ops, static const struct of_device_id ahci_dm816_of_match[] = { { .compatible = "ti,dm816-ahci", }, - { }, + { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, ahci_dm816_of_match); |