lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1348718135-10300-1-git-send-email-festevam@gmail.com>
Date:	Thu, 27 Sep 2012 00:55:35 -0300
From:	Fabio Estevam <festevam@...il.com>
To:	sameo@...ux.intel.com
Cc:	broonie@...nsource.wolfsonmicro.com, marex@...x.de,
	ashish.jangam@...tcummins.com, dchen@...semi.com,
	linux-kernel@...r.kernel.org,
	Fabio Estevam <fabio.estevam@...escale.com>
Subject: [PATCH] mfd: da9052-core: Fix request_threaded_irq() parameter

From: Fabio Estevam <fabio.estevam@...escale.com>

On a mx53qsb dt-kernel the da9052-core driver fails to probe:

da9052 1-0048: DA9052 ADC IRQ failed ret=-22

In request_threaded_irq() the first parameter is missing the da9052->irq_base.

Fix it and avoid the error.

Also define 'DA9052_IRQF' for improving readability.

Signed-off-by: Fabio Estevam <fabio.estevam@...escale.com>
---
 drivers/mfd/da9052-core.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/mfd/da9052-core.c b/drivers/mfd/da9052-core.c
index a0a62b2..a3450d2 100644
--- a/drivers/mfd/da9052-core.c
+++ b/drivers/mfd/da9052-core.c
@@ -33,6 +33,7 @@
 #define DA9052_IRQ_MASK_POS_6		0x20
 #define DA9052_IRQ_MASK_POS_7		0x40
 #define DA9052_IRQ_MASK_POS_8		0x80
+#define DA9052_IRQF			(IRQF_TRIGGER_LOW | IRQF_ONESHOT)
 
 static bool da9052_reg_readable(struct device *dev, unsigned int reg)
 {
@@ -788,16 +789,15 @@ int __devinit da9052_device_init(struct da9052 *da9052, u8 chip_id)
 		da9052->irq_base = pdata->irq_base;
 
 	ret = regmap_add_irq_chip(da9052->regmap, da9052->chip_irq,
-				  IRQF_TRIGGER_LOW | IRQF_ONESHOT,
-				  da9052->irq_base, &da9052_regmap_irq_chip,
-				  &da9052->irq_data);
+				  DA9052_IRQF, da9052->irq_base,
+				  &da9052_regmap_irq_chip, &da9052->irq_data);
 	if (ret < 0)
 		goto regmap_err;
 
 	da9052->irq_base = regmap_irq_chip_get_base(da9052->irq_data);
 
-	ret = request_threaded_irq(DA9052_IRQ_ADC_EOM, NULL, da9052_auxadc_irq,
-				   IRQF_TRIGGER_LOW | IRQF_ONESHOT,
+	ret = request_threaded_irq(da9052->irq_base + DA9052_IRQ_ADC_EOM, NULL,
+				   da9052_auxadc_irq, DA9052_IRQF,
 				   "adc irq", da9052);
 	if (ret != 0)
 		dev_err(da9052->dev, "DA9052 ADC IRQ failed ret=%d\n", ret);
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ