Re: [PATCH 1/5] i2c: acpi: Factor out getting the IRQ from ACPI
From: Mika Westerberg
Date: Tue May 21 2019 - 07:19:46 EST
On Mon, May 20, 2019 at 09:49:32AM +0100, Charles Keepax wrote:
> In preparation for future refactoring factor out the fetch of the IRQ
> into its own helper function.
>
> Signed-off-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>
> ---
> drivers/i2c/i2c-core-acpi.c | 40 +++++++++++++++++++++++++---------------
> 1 file changed, 25 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c
> index 2728006920888..c3ac3ea184317 100644
> --- a/drivers/i2c/i2c-core-acpi.c
> +++ b/drivers/i2c/i2c-core-acpi.c
> @@ -137,13 +137,35 @@ static int i2c_acpi_do_lookup(struct acpi_device *adev,
> return 0;
> }
>
> +static int i2c_acpi_get_irq(struct acpi_device *adev, int *irq)
I think here the function should return irq instead, and negative errno
in case of failure.