Re: [PATCH] IIO: Adds ACPI support for ST gyroscopes

From: Linus Walleij
Date: Tue Mar 24 2015 - 06:44:45 EST


On Mon, Mar 23, 2015 at 2:40 PM, Robert Dolca <robert.dolca@xxxxxxxxx> wrote:

Oh more comments still...

> + /* Get IRQ GPIO */
> + gpiod_irq = devm_gpiod_get_index(&client->dev, 0, 0);
> + if (IS_ERR(gpiod_irq))
> + return -ENODEV;

Shouldn't that be devm_gpiod_get_index_optional()?

I think the driver is useable also without that GPIO/IRQ
and should not error out. (Will cause bugs in other
platforms!)

Also: maybe the GPIO/IRQ support should be in a separate
patch so as not to confuse with the ACPI stuff.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/