Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754769AbbHCRat (ORCPT ); Mon, 3 Aug 2015 13:30:49 -0400 Received: from mail-la0-f47.google.com ([209.85.215.47]:33700 "EHLO mail-la0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754305AbbHCRar (ORCPT ); Mon, 3 Aug 2015 13:30:47 -0400 Date: Mon, 3 Aug 2015 19:30:40 +0200 From: Rabin Vincent To: Linus Walleij Cc: Alexandre Courbot , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 2/2] gpio: etraxfs: add interrupt support Message-ID: <20150803173005.GA28817@debian> References: <1438346937-9020-1-git-send-email-rabin@rab.in> <1438346937-9020-2-git-send-email-rabin@rab.in> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Content-Length: 761 Lines: 16 On Mon, Aug 03, 2015 at 11:34:23AM +0200, Linus Walleij wrote: > On Fri, Jul 31, 2015 at 2:48 PM, Rabin Vincent wrote: > > +static void etraxfs_gpio_irq_ack(struct irq_data *d) > > +{ > > + struct etraxfs_gpio_chip *chip = irq_data_get_irq_chip_data(d); > > I don't see how this works in the irqchip functions. The offset of the gpio_chip embedded in etraxfs_gpio_chip is zero. There are a couple of other gpio drivers doing it the same way, but container_of() would certainly be more robust. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/