input: sensors: mc3230: Call filp_open() only when CONFIG_NO_GKI

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ic125f35520517ef99b985dc5936ab3b2e7191957
This commit is contained in:
Tao Huang
2024-05-11 14:27:22 +08:00
parent 320cb810fe
commit 95c90bc02e

View File

@@ -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;