Re: [PATCH 08/15] iio: imu: bmi160: use irq_get_trigger_type()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2 Sep 2024 14:45:52 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:

> On Sun, Sep 01, 2024 at 02:59:43PM +0100, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> > 
> > Use irq_get_trigger_type() to replace getting the irq data then the
> > type in two steps.  
> 
> ...
> 
> >  {
> > -	struct irq_data *desc;
> > -	u32 irq_type;
> >  	int ret;
> > -
> > -	desc = irq_get_irq_data(irq);
> > -	if (!desc) {
> > -		dev_err(&indio_dev->dev, "Could not find IRQ %d\n", irq);
> > -		return -EINVAL;
> > -	}
> > -
> > -	irq_type = irqd_get_trigger_type(desc);
> > +	u32 irq_type = irq_get_trigger_type(irq);  
> 
> Hmm... You broke the reversed xmas tree ordering.
> Anyway, can we actually
I put this back.
> 
> >  	ret = bmi160_config_device_irq(indio_dev, irq_type, pin);  
> 
> 	ret = bmi160_config_device_irq(indio_dev, irq_get_trigger_type(irq), pin);
> 
> instead?
Nope. irq_type is passed into the probe_trigger function outside the context
we can see in the patch.

Jonathan
> 
> >  	if (ret)  
> 





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux