Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753108AbZK3Jsl (ORCPT ); Mon, 30 Nov 2009 04:48:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752533AbZK3Jsk (ORCPT ); Mon, 30 Nov 2009 04:48:40 -0500 Received: from caramon.arm.linux.org.uk ([78.32.30.218]:33770 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753005AbZK3Jsk (ORCPT ); Mon, 30 Nov 2009 04:48:40 -0500 Date: Mon, 30 Nov 2009 09:48:13 +0000 From: Russell King - ARM Linux To: Marc Zyngier Cc: Eric Miao , Stephen Rothwell , Dominik Brodowski , linux-next@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: linux-next: manual merge of the pcmcia tree with the pxa tree Message-ID: <20091130094813.GC1638@n2100.arm.linux.org.uk> References: <20091130131627.8ccc6033.sfr@canb.auug.org.au> <20091130091007.7a5fd554@hina.wild-wind.fr.eu.org> <20091130102444.4ebc0a45@life-in-the-fast-lane> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091130102444.4ebc0a45@life-in-the-fast-lane> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1206 Lines: 43 On Mon, Nov 30, 2009 at 10:24:44AM +0100, Marc Zyngier wrote: > Sounds good. I'll post rebased patches as soon as PCMCIA hits Linus' > tree. What would be a better idea is to rework the driver once my changes have hit. If you need to pass additional data around, you can do it like this: struct my_socket { struct soc_pcmcia_socket skt; ... }; #define to_my_socket(s) container_of(s, struct my_socket, skt) static struct pcmcia_low_level my_ops = { }; static int my_probe(struct platform_device *dev) { struct my_socket *skts; pxa2xx_drv_pcmcia_ops(&my_ops); skts = kzalloc(sizeof(*skts) * nr, GFP_KERNEL); if (!skts) ... for (i = 0; i < nr; i++) { skts[i].skt.nr = i; skts[i].skt.ops = &my_ops; skts[i].skt.socket.owner = THIS_MODULE; skts[i].skt.socket.parent = &dev->dev; skts[i].skt.socket.pci_irq = the_socket_irq; ret = pxa2xx_drv_pcmcia_add_one(&skts[i].skt); if (ret) goto free_registered_sockets_and_return_ret; } } -- 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/