Merge tag 'upstream-3.11-rc1' of git://git.infradead.org/linux-ubi
[firefly-linux-kernel-4.4.55.git] / drivers / rtc / rtc-msm6242.c
index 771f86a05d14209233e11c9d1106b336a484b7ce..426cb5189daa7ee395bd842476ce4430be5426d4 100644 (file)
@@ -111,8 +111,8 @@ static void msm6242_lock(struct msm6242_priv *priv)
        }
 
        if (!cnt)
-               pr_warning("msm6242: timed out waiting for RTC (0x%x)\n",
-                          msm6242_read(priv, MSM6242_CD));
+               pr_warn("msm6242: timed out waiting for RTC (0x%x)\n",
+                       msm6242_read(priv, MSM6242_CD));
 }
 
 static void msm6242_unlock(struct msm6242_priv *priv)
@@ -199,7 +199,6 @@ static int __init msm6242_rtc_probe(struct platform_device *pdev)
        struct resource *res;
        struct msm6242_priv *priv;
        struct rtc_device *rtc;
-       int error;
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        if (!res)
@@ -216,22 +215,11 @@ static int __init msm6242_rtc_probe(struct platform_device *pdev)
 
        rtc = devm_rtc_device_register(&pdev->dev, "rtc-msm6242",
                                &msm6242_rtc_ops, THIS_MODULE);
-       if (IS_ERR(rtc)) {
-               error = PTR_ERR(rtc);
-               goto out_unmap;
-       }
+       if (IS_ERR(rtc))
+               return PTR_ERR(rtc);
 
        priv->rtc = rtc;
        return 0;
-
-out_unmap:
-       platform_set_drvdata(pdev, NULL);
-       return error;
-}
-
-static int __exit msm6242_rtc_remove(struct platform_device *pdev)
-{
-       return 0;
 }
 
 static struct platform_driver msm6242_rtc_driver = {
@@ -239,7 +227,6 @@ static struct platform_driver msm6242_rtc_driver = {
                .name   = "rtc-msm6242",
                .owner  = THIS_MODULE,
        },
-       .remove = __exit_p(msm6242_rtc_remove),
 };
 
 module_platform_driver_probe(msm6242_rtc_driver, msm6242_rtc_probe);