diff --git a/drivers/input/touchscreen/sec_mmi/sec_ts_mmi_class.c b/drivers/input/touchscreen/sec_mmi/sec_ts_mmi_class.c index d22ba4fce2c5..771270714da6 100644 --- a/drivers/input/touchscreen/sec_mmi/sec_ts_mmi_class.c +++ b/drivers/input/touchscreen/sec_mmi/sec_ts_mmi_class.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include "sec_ts.h" @@ -126,7 +127,7 @@ static int sec_mmi_extend_attribute_group(struct device *dev, struct attribute_g if (ts->plat_data->hold_grip_ctrl) ADD_ATTR(hold_grip); - if (strncmp(mmi_bl_bootmode(), "mot-factory", strlen("mot-factory")) == 0) { + if (strncmp(bi_bootmode(), "mot-factory", strlen("mot-factory")) == 0) { ADD_ATTR(address); ADD_ATTR(size); ADD_ATTR(data); diff --git a/drivers/input/touchscreen/stmicro_mmi/fts_mmi_class.c b/drivers/input/touchscreen/stmicro_mmi/fts_mmi_class.c index 47af3c215bdb..b8ed4c9d0e26 100644 --- a/drivers/input/touchscreen/stmicro_mmi/fts_mmi_class.c +++ b/drivers/input/touchscreen/stmicro_mmi/fts_mmi_class.c @@ -20,6 +20,7 @@ #include "fts_lib/ftsError.h" #include "fts_lib/ftsSoftware.h" #include "fts_lib/ftsGesture.h" +#include #include #ifdef TS_MMI_TOUCH_MULTIWAY_UPDATE_FW @@ -117,7 +118,7 @@ static int fts_mmi_extend_attribute_group(struct device *dev, struct attribute_g if (ts->board->edge_ctrl) ADD_ATTR(edge); - if (strncmp(mmi_bl_bootmode(), "mot-factory", strlen("mot-factory")) == 0) { + if (strncmp(bi_bootmode(), "mot-factory", strlen("mot-factory")) == 0) { ADD_ATTR(calibrate); } diff --git a/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_class.c b/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_class.c index 9192ad348291..e0e0b6b7c361 100644 --- a/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_class.c +++ b/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_class.c @@ -552,40 +552,6 @@ static int ts_mmi_default_pinctrl(struct device *parent, int on) return 0; } -#define BOOTMODE_MAX_LEN 64 -const char *mmi_bl_bootmode(void) -{ - const char *bootargs = NULL; - char *end = NULL; - char *idx = NULL; - struct device_node *np; - static char bootmode[BOOTMODE_MAX_LEN] = {'\0'}; - - if (bootmode[0] != '\0') - return bootmode; - - np = of_find_node_by_path("/chosen"); - if (np == NULL) - return NULL; - - if (of_property_read_string(np, "bootargs", &bootargs) != 0) - goto putnode; - - idx = strstr(bootargs, "androidboot.mode="); - if (idx) { - end = strpbrk(idx, " "); - idx = strpbrk(idx, "="); - if (idx && end > idx) - strlcpy(bootmode, idx + 1, end - idx); - } - -putnode: - of_node_put(np); - return bootmode; -} - -EXPORT_SYMBOL(mmi_bl_bootmode); - /** * ts_mmi_dev_register - register a new object of ts_mmi_dev class. * @parent: The device to register.