diff --git a/drivers/input/sensors/accel/mc3230.c b/drivers/input/sensors/accel/mc3230.c index a2278b452b38..1f15eae18953 100644 --- a/drivers/input/sensors/accel/mc3230.c +++ b/drivers/input/sensors/accel/mc3230.c @@ -179,10 +179,13 @@ static int mc3230_active(struct i2c_client *client, int enable); static void MC32X0_rbm(struct i2c_client *client, int enable); static int init_3230_ctl_data(struct i2c_client *client); -struct file *openFile(const char *path, int flag, int mode) +static struct file *openFile(const char *path, int flag, int mode) { struct file *fp; + if (!IS_ENABLED(CONFIG_NO_GKI)) + return NULL; + fp = filp_open(path, flag, mode); if (IS_ERR(fp) || !fp->f_op) return NULL;