Merge tag 'hsi-for-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi
[pandora-kernel.git] / drivers / phy / phy-spear1310-miphy.c
index 6dcbfcd..9f47fae 100644 (file)
@@ -212,10 +212,8 @@ static int spear1310_miphy_probe(struct platform_device *pdev)
        struct phy_provider *phy_provider;
 
        priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
-       if (!priv) {
-               dev_err(dev, "can't alloc spear1310_miphy private date memory\n");
+       if (!priv)
                return -ENOMEM;
-       }
 
        priv->misc =
                syscon_regmap_lookup_by_phandle(dev->of_node, "misc");
@@ -229,7 +227,7 @@ static int spear1310_miphy_probe(struct platform_device *pdev)
                return -EINVAL;
        }
 
-       priv->phy = devm_phy_create(dev, NULL, &spear1310_miphy_ops, NULL);
+       priv->phy = devm_phy_create(dev, NULL, &spear1310_miphy_ops);
        if (IS_ERR(priv->phy)) {
                dev_err(dev, "failed to create SATA PCIe PHY\n");
                return PTR_ERR(priv->phy);
@@ -252,22 +250,11 @@ static struct platform_driver spear1310_miphy_driver = {
        .probe          = spear1310_miphy_probe,
        .driver = {
                .name = "spear1310-miphy",
-               .owner = THIS_MODULE,
                .of_match_table = of_match_ptr(spear1310_miphy_of_match),
        },
 };
 
-static int __init spear1310_miphy_phy_init(void)
-{
-       return platform_driver_register(&spear1310_miphy_driver);
-}
-module_init(spear1310_miphy_phy_init);
-
-static void __exit spear1310_miphy_phy_exit(void)
-{
-       platform_driver_unregister(&spear1310_miphy_driver);
-}
-module_exit(spear1310_miphy_phy_exit);
+module_platform_driver(spear1310_miphy_driver);
 
 MODULE_DESCRIPTION("ST SPEAR1310-MIPHY driver");
 MODULE_AUTHOR("Pratyush Anand <pratyush.anand@st.com>");