Skip to content

Commit 2b5d85d

Browse files
liuyx1314rkhuangtao
authored andcommitted
driver: input: sensor: fix unbalanced enable for some sensor irq
[ 31.190438] Unbalanced enable for IRQ 163 [ 31.190481] ------------[ cut here ]------------ [ 31.190495] WARNING: at kernel/irq/manage.c:513 [ 31.190505] Modules linked in: bcmdhd [ 31.190525] [ 31.190544] CPU: 1 PID: 270 Comm: [email protected] Not tainted 4.4.93 torvalds#175 [ 31.190561] Hardware name: Rockchip rk3368 xkp board (DT) [ 31.190575] task: ffffffc076ac2700 task.stack: ffffffc076b28000 [ 31.190601] PC is at __enable_irq+0x34/0x74 [ 31.190614] LR is at __enable_irq+0x34/0x74 ... [ 31.198173] [<ffffff80080f5d84>] __enable_irq+0x34/0x74 [ 31.198188] [<ffffff80080f5e30>] enable_irq+0x6c/0x94 [ 31.198207] [<ffffff800868e11c>] sensor_enable+0x78/0x13c [ 31.198222] [<ffffff800868e8a8>] light_dev_ioctl+0x1a4/0x1d4 [ 31.198240] [<ffffff80081c71d4>] do_vfs_ioctl+0x5e4/0x720 [ 31.198254] [<ffffff80081c7370>] SyS_ioctl+0x60/0x88 [ 31.198270] [<ffffff8008082930>] el0_svc_naked+0x24/0x28 Change-Id: Ieba4a76910fde7381ea4b8113cca20fa068fabbd Signed-off-by: Zorro Liu <[email protected]>
1 parent 024b72d commit 2b5d85d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

drivers/input/sensors/sensor-dev.c

+1-6
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,7 @@ static int sensor_irq_init(struct i2c_client *client)
229229
}
230230

231231
client->irq = irq;
232-
if ((sensor->pdata->type == SENSOR_TYPE_GYROSCOPE) || (sensor->pdata->type == SENSOR_TYPE_ACCEL) || (sensor->pdata->type == SENSOR_TYPE_ANGLE))
233-
disable_irq_nosync(client->irq);
234-
if (((sensor->pdata->type == SENSOR_TYPE_LIGHT) || (sensor->pdata->type == SENSOR_TYPE_PROXIMITY)) && (!(sensor->ops->trig & IRQF_SHARED)))
235-
disable_irq_nosync(client->irq);
236-
if (((sensor->pdata->type == SENSOR_TYPE_TEMPERATURE) || (sensor->pdata->type == SENSOR_TYPE_PRESSURE)) && (!(sensor->ops->trig & IRQF_SHARED)))
237-
disable_irq_nosync(client->irq);
232+
disable_irq_nosync(client->irq);
238233

239234
dev_info(&client->dev, "%s:use irq=%d\n", __func__, irq);
240235
} else if (!sensor->pdata->irq_enable) {

0 commit comments

Comments
 (0)