From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752653AbbJOKUp (ORCPT ); Thu, 15 Oct 2015 06:20:45 -0400 Received: from foss.arm.com ([217.140.101.70]:34673 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752583AbbJOKUn (ORCPT ); Thu, 15 Oct 2015 06:20:43 -0400 Date: Thu, 15 Oct 2015 11:20:37 +0100 From: Mark Rutland To: Lars-Peter Clausen Cc: Martin Kepplinger , robh+dt@kernel.org, pawel.moll@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, jic23@kernel.org, knaack.h@gmx.de, pmeerw@pmeerw.net, mfuzzey@parkeon.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, Martin Kepplinger Subject: Re: [PATCH v3] iio: mma8452: support either of the available interrupt pins Message-ID: <20151015102037.GB8825@leverpostej> References: <1444828542-28861-1-git-send-email-martink@posteo.de> <561E70E0.1010508@metafoo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <561E70E0.1010508@metafoo.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 14, 2015 at 05:12:32PM +0200, Lars-Peter Clausen wrote: > On 10/14/2015 03:15 PM, Martin Kepplinger wrote: > [...] > > + if (irq1 > 0) > > + client->irq = irq1; > > You must not overwrite client->irq, that field is manged by the I2C core and > is supposed to be read only for device drivers. Ok. I think for the moment the simlpest thing to do would be to check which of INT1 and INT2 match client->irq, and use that. Thanks, Mark.