]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/video/omap2/omapfb/omapfb-sysfs.c
OMAP: DSS2: Convert simple/strict_strto* to kstrto*
[mv-sheeva.git] / drivers / video / omap2 / omapfb / omapfb-sysfs.c
index 3be76466a0ffd7fd808c04285a1e8d9fa4963148..2f5e817b2a9a65904e4f41631036fb350c478784 100644 (file)
@@ -50,10 +50,12 @@ static ssize_t store_rotate_type(struct device *dev,
        struct fb_info *fbi = dev_get_drvdata(dev);
        struct omapfb_info *ofbi = FB2OFB(fbi);
        struct omapfb2_mem_region *rg;
-       enum omap_dss_rotation_type rot_type;
+       int rot_type;
        int r;
 
-       rot_type = simple_strtoul(buf, NULL, 0);
+       r = kstrtoint(buf, 0, &rot_type);
+       if (r)
+               return r;
 
        if (rot_type != OMAP_DSS_ROT_DMA && rot_type != OMAP_DSS_ROT_VRFB)
                return -EINVAL;
@@ -102,14 +104,15 @@ static ssize_t store_mirror(struct device *dev,
 {
        struct fb_info *fbi = dev_get_drvdata(dev);
        struct omapfb_info *ofbi = FB2OFB(fbi);
-       unsigned long mirror;
+       int mirror;
        int r;
        struct fb_var_screeninfo new_var;
 
-       mirror = simple_strtoul(buf, NULL, 0);
+       r = kstrtoint(buf, 0, &mirror);
+       if (r)
+               return r;
 
-       if (mirror != 0 && mirror != 1)
-               return -EINVAL;
+       mirror = !!mirror;
 
        if (!lock_fb_info(fbi))
                return -ENODEV;
@@ -445,7 +448,11 @@ static ssize_t store_size(struct device *dev, struct device_attribute *attr,
        int r;
        int i;
 
-       size = PAGE_ALIGN(simple_strtoul(buf, NULL, 0));
+       r = kstrtoul(buf, 0, &size);
+       if (r)
+               return r;
+
+       size = PAGE_ALIGN(size);
 
        if (!lock_fb_info(fbi))
                return -ENODEV;