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]
Date:	Tue, 30 Mar 2010 19:33:29 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	pavan_savoy@...com
Cc:	marcel@...tmann.org, gregkh@...e.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers:staging: sources for HCI LL PM protocol

> The ST KIM module, is a platform device, which I use to pass the GPIO data from the arch/XX/board-XXX.c files, so, suppose we do have 2 devices for a platform, then I would need 2 platform devices right ?
> 
> And there-by can I use that platform device context ?

Yes or some struct created in the actual module and passed around in
preference to the platform device. A lot of kernel drivers end up
creating something per device that looks like

struct my_thing {
	struct device *dev;	/* or pci_dev etc */
	[ all my per device bits ]
};

and sometimes creating linked lists of them (for power management most
often)

> However the problem really is,
> 
> Suppose a BT driver wants to do an st_register() and use ST as its transport, how can I then tie it to a device ?

Not sure I follow

If you have some kind of context to kill off all the globals then you can
attach that to whatever local object you have for each device you are
interested in. That is why IRQ handlers pass a data value, why timers do,
why tty has ldisc_data, why workqueues do similar things and so on.

And if there is another layer you need to interface to which doesn't have
some kind of pointer for binding to layers above/below - add one.

--
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