lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091130094813.GC1638@n2100.arm.linux.org.uk>
Date:	Mon, 30 Nov 2009 09:48:13 +0000
From:	Russell King - ARM Linux <linux@....linux.org.uk>
To:	Marc Zyngier <maz@...terjones.org>
Cc:	Eric Miao <eric.y.miao@...il.com>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	Dominik Brodowski <linux@...inikbrodowski.net>,
	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: linux-next: manual merge of the pcmcia tree with the pxa tree

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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ