[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190528083759.GE28362@ediswmail.ad.cirrus.com>
Date: Tue, 28 May 2019 09:37:59 +0100
From: Charles Keepax <ckeepax@...nsource.cirrus.com>
To: <wsa@...-dreams.de>, <mika.westerberg@...ux.intel.com>
CC: <jarkko.nikula@...ux.intel.com>,
<andriy.shevchenko@...ux.intel.com>, <linux-i2c@...r.kernel.org>,
<linux-acpi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<benjamin.tissoires@...hat.com>, <jbroadus@...il.com>,
<patches@...nsource.cirrus.com>
Subject: Re: [PATCH v2 3/6] i2c: acpi: Factor out getting the IRQ from ACPI
On Mon, May 27, 2019 at 04:19:29PM +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@...nsource.cirrus.com>
> ---
>
> +static int i2c_acpi_get_irq(struct acpi_device *adev)
> +{
> + struct list_head resource_list;
> + int irq = -ENOENT;
> + int ret;
> +
> + INIT_LIST_HEAD(&resource_list);
> +
> + ret = acpi_dev_get_resources(adev, &resource_list,
> + i2c_acpi_add_resource, &irq);
> + if (ret < 0)
> + return -EINVAL;
> +
> + acpi_dev_free_resource_list(&resource_list);
> +
> + return irq;
> +}
> +
Sorry just noticed I forgot to add the kernel doc. Will fix that
up in the next spin, or do an incremental patch.
Thanks,
Charles
Powered by blists - more mailing lists