iio: remove gpio interrupt probing from drivers that use a single interrupt
Commit 845c877009
("i2c / ACPI: Assign IRQ for devices that have
GpioInt automatically") automatically assigns the first ACPI GPIO
interrupt in client->irq, so we can remove the probing code from
drivers that use only one interrupt.
Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:

committed by
Jonathan Cameron

parent
6839c1b070
commit
0f0796509c
@@ -868,21 +868,12 @@ static void sx9500_gpio_probe(struct i2c_client *client,
|
||||
struct sx9500_data *data)
|
||||
{
|
||||
struct device *dev;
|
||||
struct gpio_desc *gpio;
|
||||
|
||||
if (!client)
|
||||
return;
|
||||
|
||||
dev = &client->dev;
|
||||
|
||||
if (client->irq <= 0) {
|
||||
gpio = devm_gpiod_get_index(dev, SX9500_GPIO_INT, 0, GPIOD_IN);
|
||||
if (IS_ERR(gpio))
|
||||
dev_err(dev, "gpio get irq failed\n");
|
||||
else
|
||||
client->irq = gpiod_to_irq(gpio);
|
||||
}
|
||||
|
||||
data->gpiod_rst = devm_gpiod_get_index(dev, SX9500_GPIO_RESET,
|
||||
0, GPIOD_OUT_HIGH);
|
||||
if (IS_ERR(data->gpiod_rst)) {
|
||||
|
Reference in New Issue
Block a user