]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/rtc/rtc-v3020.c
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
[karo-tx-linux.git] / drivers / rtc / rtc-v3020.c
index ad741afd47d8eb272824f9d15dd4048b9acc35d6..bed4cab07043674615ab7fef5d3093e67577af44 100644 (file)
@@ -304,7 +304,6 @@ static int rtc_probe(struct platform_device *pdev)
 {
        struct v3020_platform_data *pdata = pdev->dev.platform_data;
        struct v3020 *chip;
-       struct rtc_device *rtc;
        int retval = -EBUSY;
        int i;
        int temp;
@@ -353,13 +352,12 @@ static int rtc_probe(struct platform_device *pdev)
 
        platform_set_drvdata(pdev, chip);
 
-       rtc = rtc_device_register("v3020",
+       chip->rtc = rtc_device_register("v3020",
                                &pdev->dev, &v3020_rtc_ops, THIS_MODULE);
-       if (IS_ERR(rtc)) {
-               retval = PTR_ERR(rtc);
+       if (IS_ERR(chip->rtc)) {
+               retval = PTR_ERR(chip->rtc);
                goto err_io;
        }
-       chip->rtc = rtc;
 
        return 0;