From patchwork Wed May 6 10:29:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 468856 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id CB91A1401B5 for ; Wed, 6 May 2015 20:29:16 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751124AbbEFK3P (ORCPT ); Wed, 6 May 2015 06:29:15 -0400 Received: from mga09.intel.com ([134.134.136.24]:12841 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751036AbbEFK3O (ORCPT ); Wed, 6 May 2015 06:29:14 -0400 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 06 May 2015 03:29:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,379,1427785200"; d="scan'208";a="490017445" Received: from black.fi.intel.com ([10.237.72.86]) by FMSMGA003.fm.intel.com with ESMTP; 06 May 2015 03:29:09 -0700 Received: by black.fi.intel.com (Postfix, from userid 1001) id A9237128; Wed, 6 May 2015 13:29:08 +0300 (EEST) From: Mika Westerberg To: "Rafael J. Wysocki" Cc: Linus Walleij , Alexandre Courbot , Wolfram Sang , Octavian Purdila , Robert Dolca , Mika Westerberg , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-i2c@vger.kernel.org Subject: [PATCH v2 2/3] i2c / ACPI: Use 0 to indicate that device does not have interrupt assigned Date: Wed, 6 May 2015 13:29:07 +0300 Message-Id: <1430908148-201129-3-git-send-email-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1430908148-201129-1-git-send-email-mika.westerberg@linux.intel.com> References: <1430908148-201129-1-git-send-email-mika.westerberg@linux.intel.com> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This is the convention used in most parts of the kernel including DT counterpart of I2C slave enumeration. To make things consistent do the same for ACPI I2C slave enumeration path as well. Signed-off-by: Mika Westerberg Acked-by: Wolfram Sang --- drivers/i2c/i2c-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 987c124432c5..c21b3de70234 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -107,7 +107,7 @@ static int acpi_i2c_add_resource(struct acpi_resource *ares, void *data) if (sb->access_mode == ACPI_I2C_10BIT_MODE) info->flags |= I2C_CLIENT_TEN; } - } else if (info->irq < 0) { + } else if (!info->irq) { struct resource r; if (acpi_dev_resource_interrupt(ares, 0, &r)) @@ -134,7 +134,6 @@ static acpi_status acpi_i2c_add_device(acpi_handle handle, u32 level, memset(&info, 0, sizeof(info)); info.fwnode = acpi_fwnode_handle(adev); - info.irq = -1; INIT_LIST_HEAD(&resource_list); ret = acpi_dev_get_resources(adev, &resource_list,