mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user