Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[sfrench/cifs-2.6.git] / drivers / ata / ahci_mtk.c
index c056378e3e721ed4600cc6845afcfb1dea073edf..0bf83a297091297f2dfb87bf2c97a400395679c1 100644 (file)
@@ -37,7 +37,7 @@ static const struct ata_port_info ahci_port_info = {
        .port_ops       = &ahci_platform_ops,
 };
 
-static struct scsi_host_template ahci_platform_sht = {
+static const struct scsi_host_template ahci_platform_sht = {
        AHCI_SHT(DRV_NAME),
 };
 
@@ -106,7 +106,7 @@ static int mtk_ahci_parse_property(struct ahci_host_priv *hpriv,
        struct device_node *np = dev->of_node;
 
        /* enable SATA function if needed */
-       if (of_find_property(np, "mediatek,phy-mode", NULL)) {
+       if (of_property_present(np, "mediatek,phy-mode")) {
                plat->mode = syscon_regmap_lookup_by_phandle(
                                        np, "mediatek,phy-mode");
                if (IS_ERR(plat->mode)) {