From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753528AbbD2KC7 (ORCPT ); Wed, 29 Apr 2015 06:02:59 -0400 Received: from mga01.intel.com ([192.55.52.88]:61670 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751827AbbD2KC5 (ORCPT ); Wed, 29 Apr 2015 06:02:57 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,670,1422950400"; d="scan'208";a="717662469" Date: Wed, 29 Apr 2015 13:02:49 +0300 From: Mika Westerberg To: Wolfram Sang Cc: "Rafael J. Wysocki" , Linus Walleij , Alexandre Courbot , Octavian Purdila , Robert Dolca , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Subject: Re: [PATCH 2/2] i2c / ACPI: Assign IRQ for devices that have GpioInt automatically Message-ID: <20150429100249.GR1534@lahna.fi.intel.com> References: <1430233507-29389-1-git-send-email-mika.westerberg@linux.intel.com> <1430233507-29389-3-git-send-email-mika.westerberg@linux.intel.com> <20150429095605.GA2470@katana> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150429095605.GA2470@katana> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 29, 2015 at 11:56:06AM +0200, Wolfram Sang wrote: > > > - if (!client->irq && dev->of_node) { > > - int irq = of_irq_get(dev->of_node, 0); > > + if (client->irq <= 0) { > > + int irq = -ENOENT; > > Why the move from !client->irq to <= 0? If I didn't miss something, > interrupt numbers are still a sleeping dog with all the unsigned vs > signed fuzz. If this change is needed, this needs proper description and > ideally a seperate patch. It is there because ACPI parts of I2C client enumeration code initializes client->irq with -1. Alternatively we can change that code to use 0 for missing IRQ.