Title: [9406] trunk/drivers/staging/iio/adc/adt7310.c: staging: iio: adt7310 Remove use of irq_flags
Revision
9406
Author
hennerich
Date
2010-10-25 10:56:48 -0400 (Mon, 25 Oct 2010)

Log Message

staging: iio: adt7310 Remove use of irq_flags

There is a pending patch adding irq_flags to I2C/SPI board info.
It's currently not sure if it get accepted or rejected.
Temporarily use IRQF_TRIGGER_LOW, and make sure the chip IRQ line
polarity is set accordingly.

Modified Paths

Diff

Modified: trunk/drivers/staging/iio/adc/adt7310.c (9405 => 9406)


--- trunk/drivers/staging/iio/adc/adt7310.c	2010-10-25 14:56:10 UTC (rev 9405)
+++ trunk/drivers/staging/iio/adc/adt7310.c	2010-10-25 14:56:48 UTC (rev 9406)
@@ -781,6 +781,7 @@
 	struct adt7310_chip_info *chip;
 	int ret = 0;
 	unsigned long *adt7310_platform_data = spi_dev->dev.platform_data;
+	unsigned long irq_flags;
 
 	chip = kzalloc(sizeof(struct adt7310_chip_info), GFP_KERNEL);
 
@@ -814,11 +815,13 @@
 	/* CT critcal temperature event. line 0 */
 	if (spi_dev->irq) {
 		if (adt7310_platform_data[2])
-			spi_dev->irq_flags = adt7310_platform_data[2];
+			irq_flags = adt7310_platform_data[2];
+		else
+			irq_flags = IRQF_TRIGGER_LOW;
 		ret = iio_register_interrupt_line(spi_dev->irq,
 				chip->indio_dev,
 				0,
-				spi_dev->irq_flags,
+				irq_flags,
 				chip->name);
 		if (ret)
 			goto error_unreg_dev;
@@ -860,10 +863,8 @@
 			goto error_unreg_int_irq;
 		}
 
-		if (spi_dev->irq_flags & IRQF_TRIGGER_HIGH)
-			chip->config |= ADT7310_CT_POLARITY;
-		else
-			chip->config &= ~ADT7310_CT_POLARITY;
+		/* set irq polarity low level */
+		chip->config &= ~ADT7310_CT_POLARITY;
 
 		if (adt7310_platform_data[1] & IRQF_TRIGGER_HIGH)
 			chip->config |= ADT7310_INT_POLARITY;
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to