Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 70f94413 authored by Felipe Balbi's avatar Felipe Balbi Committed by Dmitry Torokhov
Browse files

Input: twl4030-pwrbutton - switch to using threaded IRQ

parent 3f58061d
Loading
Loading
Loading
Loading
+2 −12
Original line number Original line Diff line number Diff line
@@ -39,16 +39,6 @@ static irqreturn_t powerbutton_irq(int irq, void *_pwr)
	int err;
	int err;
	u8 value;
	u8 value;


#ifdef CONFIG_LOCKDEP
	/* WORKAROUND for lockdep forcing IRQF_DISABLED on us, which
	 * we don't want and can't tolerate since this is a threaded
	 * IRQ and can sleep due to the i2c reads it has to issue.
	 * Although it might be friendlier not to borrow this thread
	 * context...
	 */
	local_irq_enable();
#endif

	err = twl_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &value,
	err = twl_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &value,
				STS_HW_CONDITIONS);
				STS_HW_CONDITIONS);
	if (!err)  {
	if (!err)  {
@@ -80,7 +70,7 @@ static int __devinit twl4030_pwrbutton_probe(struct platform_device *pdev)
	pwr->phys = "twl4030_pwrbutton/input0";
	pwr->phys = "twl4030_pwrbutton/input0";
	pwr->dev.parent = &pdev->dev;
	pwr->dev.parent = &pdev->dev;


	err = request_irq(irq, powerbutton_irq,
	err = request_threaded_irq(irq, NULL, powerbutton_irq,
			IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
			IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
			"twl4030_pwrbutton", pwr);
			"twl4030_pwrbutton", pwr);
	if (err < 0) {
	if (err < 0) {