From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lars-Peter Clausen Subject: Re: [PATCH v3] iio: mma8452: support either of the available interrupt pins Date: Wed, 14 Oct 2015 17:12:32 +0200 Message-ID: <561E70E0.1010508@metafoo.de> References: <1444828542-28861-1-git-send-email-martink@posteo.de> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <1444828542-28861-1-git-send-email-martink-1KBjaw7Xf1+zQB+pC5nmwQ@public.gmane.org> Sender: linux-iio-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Martin Kepplinger , robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, pawel.moll-5wv7dgnIgG8@public.gmane.org, mark.rutland-5wv7dgnIgG8@public.gmane.org, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org, galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org, jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, knaack.h-Mmb7MZpHnFY@public.gmane.org, pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org, mfuzzey-mB3Nsq4MPf1BDgjK7y7TUQ@public.gmane.org Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Martin Kepplinger List-Id: devicetree@vger.kernel.org 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. > + dev_info(&client->dev, "using interrupt line INT1\n"); This should probably be a dev_dbg() > + } else { > + client->irq = irq2; > + dev_info(&client->dev, "using interrupt line INT2\n"); Same here > + }