move:
energy/lcd/s6e8aa0.c --> energy/lcd/lcd_base.c
Change-Id: I8ff66df899d429cbfaeba2b10dbc2c60ce8c11bf
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
#include <linux/module.h>
+#include <linux/fs.h>
#include "lcd_base.h"
+int read_val(const char *path)
+{
+ int ret;
+ struct file *f;
+ unsigned long val;
+ char buf[32];
+
+ f = filp_open(path, O_RDONLY, 0);
+ if (IS_ERR(f)) {
+ printk("cannot open file \'%s\'", path);
+ return PTR_ERR(f);
+ }
+
+ ret = kernel_read(f, 0, buf, sizeof(buf));
+ filp_close(f, NULL);
+ if (ret < 0)
+ return ret;
+
+ ret = strict_strtoul(buf, 0, &val);
+ if (ret)
+ return ret;
+
+ return (int)val;
+}
+
void set_backlight(int val)
{
/* TODO: implement */
}
#endif /* CONFIG_ENEGRGY_LCD */
+int read_val(const char *path);
int lcd_init(void);
void lcd_exit(void);
static struct lcd_ops_set *ops_s = NULL;
-static int read_val(const char *path)
-{
- int ret;
- struct file *f;
- unsigned long val;
- char buf[32];
-
- f = filp_open(path, O_RDONLY, 0);
- if (IS_ERR(f)) {
- printk("cannot open file \'%s\'", path);
- return PTR_ERR(f);
- }
-
- ret = kernel_read(f, 0, buf, sizeof(buf));
- filp_close(f, NULL);
- if (ret < 0)
- return ret;
-
- ret = strict_strtoul(buf, 0, &val);
- if (ret)
- return ret;
-
- return (int)val;
-}
-
-