]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/rtc/rtc-v3020.c
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[karo-tx-linux.git] / drivers / rtc / rtc-v3020.c
index 423cd5a30b10d2d5fa0dfe432e30f1d45eff91fd..f71c3ce180369225938f8ba21a6960e605f9d251 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/rtc-v3020.h>
 #include <linux/delay.h>
 #include <linux/gpio.h>
+#include <linux/slab.h>
 
 #include <linux/io.h>
 
@@ -304,7 +305,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;
@@ -335,7 +335,7 @@ static int rtc_probe(struct platform_device *pdev)
                goto err_io;
        }
 
-       /* Make sure frequency measurment mode, test modes, and lock
+       /* Make sure frequency measurement mode, test modes, and lock
         * are all disabled */
        v3020_set_reg(chip, V3020_STATUS_0, 0x0);
 
@@ -353,13 +353,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;