Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4743050ybi; Tue, 28 May 2019 01:39:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJCK1KIbkgyTV/nt6TJml8K8g1H1mvT8PePt1zAqXU5l28cpmIeWh2ESoTBnmieQA6zRGE X-Received: by 2002:a62:1bcc:: with SMTP id b195mr87283757pfb.75.1559032783342; Tue, 28 May 2019 01:39:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559032783; cv=none; d=google.com; s=arc-20160816; b=PPLKS7QAZ3JTwrCPJ62wp2NJQ6FUckkQuuVPUkT3Nbe48OKyVnn+NJwNKgBQcCoH9X xOahMzI4NRWkHZgkHuC0Ow3XuTbqeExK/4fReTUD351/kT6/ypuO9mWTM9hA9+AMaTHC DOni3ylPjG35HvnYzsdWGqLpA38aN92SwszGpa6kuaL/iPYJZ2X83vLrlOIONW1qmZA4 oDJkQzUqRzHIbwzpjOPhPu/WK8gunWcDFcFAU04xVTTwsZ097xpcNuUr9ZLaV/L6VIwz WAPE0yZeEY8+dpr/kPlcIgGlwUQAM5PWplIrR/RAnSoo78J6EnM5Zr5wCwi/Xq4KO3Hn 4W5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=QK6MsB5/sOf4EF9lZCcWVqAIDK03n3QYPPxDh3GBy0o=; b=jDe6kZX+oXTDbZa8TvgKyyKhkI3exr0zA0KnBM6kMxBjwJogx70ZMtMcuv8Kr1N/hZ 35pCJ/+0R5TwWLJGfZYiu6a7RvXhQsUaqTGZFGDBc7trOPzhthQmh0N+gHBb+jaA47ui VMT1rkBs3MERBbgNJU/gWTG2ZjHo1NDON5x2LGd0iq8Jrz+KcCTbyFDBixRpYJnnKCY7 nbybcnoAvbnaTjwNX+aXd7RxTH5fkjHxieVVcLErIk0daWExLQWeMU8ZXYGe51zC1jPI vR3J+FRHMpcoPVk+8LHQo1UHmVHKbooRi2U+/YrpDuaensPkBz7jrGoEmTxwknoeWv+4 u3aw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=opensource.cirrus.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t139si24452380pfc.192.2019.05.28.01.39.26; Tue, 28 May 2019 01:39:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=opensource.cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726779AbfE1IiJ (ORCPT + 99 others); Tue, 28 May 2019 04:38:09 -0400 Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]:34852 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726557AbfE1IiI (ORCPT ); Tue, 28 May 2019 04:38:08 -0400 Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4S8Ypex005799; Tue, 28 May 2019 03:38:01 -0500 Authentication-Results: ppops.net; spf=none smtp.mailfrom=ckeepax@opensource.cirrus.com Received: from mail1.cirrus.com (mail1.cirrus.com [141.131.3.20]) by mx0b-001ae601.pphosted.com with ESMTP id 2sq24q31hw-1; Tue, 28 May 2019 03:38:01 -0500 Received: from EDIEX02.ad.cirrus.com (unknown [198.61.84.81]) by mail1.cirrus.com (Postfix) with ESMTP id 995EB611C8B3; Tue, 28 May 2019 03:38:00 -0500 (CDT) Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1591.10; Tue, 28 May 2019 09:38:00 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.1591.10 via Frontend Transport; Tue, 28 May 2019 09:38:00 +0100 Received: from ediswmail.ad.cirrus.com (ediswmail.ad.cirrus.com [198.61.86.93]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id EE3A22A1; Tue, 28 May 2019 09:37:59 +0100 (BST) Date: Tue, 28 May 2019 09:37:59 +0100 From: Charles Keepax To: , CC: , , , , , , , Subject: Re: [PATCH v2 3/6] i2c: acpi: Factor out getting the IRQ from ACPI Message-ID: <20190528083759.GE28362@ediswmail.ad.cirrus.com> References: <20190527151932.14310-1-ckeepax@opensource.cirrus.com> <20190527151932.14310-3-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20190527151932.14310-3-ckeepax@opensource.cirrus.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=815 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905280058 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > > +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