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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220416120726.0ba78960@jic23-huawei>
Date:   Sat, 16 Apr 2022 12:07:26 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
        Andreas Klinger <ak@...klinger.de>,
        Lars-Peter Clausen <lars@...afoo.de>
Subject: Re: [PATCH v1 1/1] iio: proximity: mb1232: Switch to use
 fwnode_irq_get()

On Wed, 13 Apr 2022 21:31:23 +0300
Andy Shevchenko <andriy.shevchenko@...ux.intel.com> wrote:

> We have OF-centric variant of fwnode_irq_get() in the driver.
> Replace it with a call to an agnostic implementation.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

Whilst I 'think' this ends up being functionally identical
I'd like to leave it a little longer to see if Andreas has
time to take a look and verify this change is fine.

There seem to be subtle differences in the irq setup as the
new code does a sanity check on the domain being available
and defers if not which I don't think happens with the
existing code.

Thanks,

Jonathan


> ---
>  drivers/iio/proximity/mb1232.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/proximity/mb1232.c b/drivers/iio/proximity/mb1232.c
> index ad4b1fb2607a..0bca5f74de68 100644
> --- a/drivers/iio/proximity/mb1232.c
> +++ b/drivers/iio/proximity/mb1232.c
> @@ -10,12 +10,14 @@
>   * https://www.maxbotix.com/documents/I2CXL-MaxSonar-EZ_Datasheet.pdf
>   */
>  
> +#include <linux/bitops.h>
>  #include <linux/err.h>
>  #include <linux/i2c.h>
> -#include <linux/of_irq.h>
>  #include <linux/delay.h>
> +#include <linux/mod_devicetable.h>
>  #include <linux/module.h>
> -#include <linux/bitops.h>
> +#include <linux/property.h>
> +
>  #include <linux/iio/iio.h>
>  #include <linux/iio/sysfs.h>
>  #include <linux/iio/buffer.h>
> @@ -209,7 +211,7 @@ static int mb1232_probe(struct i2c_client *client,
>  
>  	init_completion(&data->ranging);
>  
> -	data->irqnr = irq_of_parse_and_map(dev->of_node, 0);
> +	data->irqnr = fwnode_irq_get(dev_fwnode(&client->dev), 0);
>  	if (data->irqnr <= 0) {
>  		/* usage of interrupt is optional */
>  		data->irqnr = -1;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ