ahci: imx: fix building without hwmon or thermal
[linux-2.6-microblaze.git] / drivers / ata / ahci_imx.c
index 420f065..787567e 100644 (file)
@@ -774,7 +774,8 @@ static int imx_ahci_probe(struct platform_device *pdev)
        if (ret)
                return ret;
 
-       if (imxpriv->type == AHCI_IMX53) {
+       if (imxpriv->type == AHCI_IMX53 &&
+           IS_ENABLED(CONFIG_HWMON)) {
                /* Add the temperature monitor */
                struct device *hwmon_dev;