Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fbdev: omapfb: Use kstrtobool() instead of strtobool()

strtobool() is the same as kstrtobool().
However, the latter is more used within the kernel.

In order to remove strtobool() and slightly simplify kstrtox.h, switch to
the other function name.

While at it, include the corresponding header file (<linux/kstrtox.h>)

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Helge Deller <deller@gmx.de>

authored by

Christophe JAILLET and committed by
Helge Deller
ee9fffdc 67a90bcc

+12 -8
+4 -3
drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c
··· 10 10 #define DSS_SUBSYS_NAME "DISPLAY" 11 11 12 12 #include <linux/kernel.h> 13 + #include <linux/kstrtox.h> 13 14 #include <linux/module.h> 14 15 #include <linux/platform_device.h> 15 16 #include <linux/sysfs.h> ··· 37 36 int r; 38 37 bool enable; 39 38 40 - r = strtobool(buf, &enable); 39 + r = kstrtobool(buf, &enable); 41 40 if (r) 42 41 return r; 43 42 ··· 74 73 if (!dssdev->driver->enable_te || !dssdev->driver->get_te) 75 74 return -ENOENT; 76 75 77 - r = strtobool(buf, &te); 76 + r = kstrtobool(buf, &te); 78 77 if (r) 79 78 return r; 80 79 ··· 184 183 if (!dssdev->driver->set_mirror || !dssdev->driver->get_mirror) 185 184 return -ENOENT; 186 185 187 - r = strtobool(buf, &mirror); 186 + r = kstrtobool(buf, &mirror); 188 187 if (r) 189 188 return r; 190 189
+4 -3
drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c
··· 10 10 #define DSS_SUBSYS_NAME "MANAGER" 11 11 12 12 #include <linux/kernel.h> 13 + #include <linux/kstrtox.h> 13 14 #include <linux/slab.h> 14 15 #include <linux/module.h> 15 16 #include <linux/platform_device.h> ··· 247 246 bool enable; 248 247 int r; 249 248 250 - r = strtobool(buf, &enable); 249 + r = kstrtobool(buf, &enable); 251 250 if (r) 252 251 return r; 253 252 ··· 291 290 if(!dss_has_feature(FEAT_ALPHA_FIXED_ZORDER)) 292 291 return -ENODEV; 293 292 294 - r = strtobool(buf, &enable); 293 + r = kstrtobool(buf, &enable); 295 294 if (r) 296 295 return r; 297 296 ··· 330 329 if (!dss_has_feature(FEAT_CPR)) 331 330 return -ENODEV; 332 331 333 - r = strtobool(buf, &enable); 332 + r = kstrtobool(buf, &enable); 334 333 if (r) 335 334 return r; 336 335
+2 -1
drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c
··· 13 13 #include <linux/err.h> 14 14 #include <linux/sysfs.h> 15 15 #include <linux/kobject.h> 16 + #include <linux/kstrtox.h> 16 17 #include <linux/platform_device.h> 17 18 18 19 #include <video/omapfb_dss.h> ··· 211 210 int r; 212 211 bool enable; 213 212 214 - r = strtobool(buf, &enable); 213 + r = kstrtobool(buf, &enable); 215 214 if (r) 216 215 return r; 217 216
+2 -1
drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c
··· 15 15 #include <linux/uaccess.h> 16 16 #include <linux/platform_device.h> 17 17 #include <linux/kernel.h> 18 + #include <linux/kstrtox.h> 18 19 #include <linux/mm.h> 19 20 #include <linux/omapfb.h> 20 21 ··· 97 96 int r; 98 97 struct fb_var_screeninfo new_var; 99 98 100 - r = strtobool(buf, &mirror); 99 + r = kstrtobool(buf, &mirror); 101 100 if (r) 102 101 return r; 103 102