Commit 06f90dd4 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Jonathan Cameron

iio: proximity: mb1232: Switch to use fwnode_irq_get()

We have OF-centric variant of fwnode_irq_get() in the driver.
Replace it with a call to an agnostic implementation.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: default avatarAndreas Klinger <ak@it-klinger.de>
Link: https://lore.kernel.org/r/20220413183123.20292-1-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent cb55b442
...@@ -10,12 +10,14 @@ ...@@ -10,12 +10,14 @@
* https://www.maxbotix.com/documents/I2CXL-MaxSonar-EZ_Datasheet.pdf * https://www.maxbotix.com/documents/I2CXL-MaxSonar-EZ_Datasheet.pdf
*/ */
#include <linux/bitops.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/of_irq.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/bitops.h> #include <linux/property.h>
#include <linux/iio/iio.h> #include <linux/iio/iio.h>
#include <linux/iio/sysfs.h> #include <linux/iio/sysfs.h>
#include <linux/iio/buffer.h> #include <linux/iio/buffer.h>
...@@ -209,7 +211,7 @@ static int mb1232_probe(struct i2c_client *client, ...@@ -209,7 +211,7 @@ static int mb1232_probe(struct i2c_client *client,
init_completion(&data->ranging); 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) { if (data->irqnr <= 0) {
/* usage of interrupt is optional */ /* usage of interrupt is optional */
data->irqnr = -1; data->irqnr = -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment