mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
parport->dev driver model support
Currently a parport_driver can't get a handle on the device node for the underlying parport (PNPACPI, PCI, etc). That prevents correct placement of sysfs child nodes, which can affect things like power management. This patch adds a field to "struct parport" pointing to that device node, and updates non-legacy port drivers to initialize that device pointer. That field replaces the analagous PCI-only support in parport_pc. [akpm@linux-foundation.org: fix powerpc build] Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
d2d9433a4c
commit
c15a3837d2
9 changed files with 33 additions and 25 deletions
|
@ -279,6 +279,10 @@ struct parport {
|
|||
int dma;
|
||||
int muxport; /* which muxport (if any) this is */
|
||||
int portnum; /* which physical parallel port (not mux) */
|
||||
struct device *dev; /* Physical device associated with IO/DMA.
|
||||
* This may unfortulately be null if the
|
||||
* port has a legacy driver.
|
||||
*/
|
||||
|
||||
struct parport *physport;
|
||||
/* If this is a non-default mux
|
||||
|
@ -289,7 +293,7 @@ struct parport {
|
|||
following structure members are
|
||||
meaningless: devices, cad, muxsel,
|
||||
waithead, waittail, flags, pdir,
|
||||
ieee1284, *_lock.
|
||||
dev, ieee1284, *_lock.
|
||||
|
||||
It this is a default mux parport, or
|
||||
there is no mux involved, this points to
|
||||
|
@ -302,7 +306,7 @@ struct parport {
|
|||
|
||||
struct pardevice *waithead;
|
||||
struct pardevice *waittail;
|
||||
|
||||
|
||||
struct list_head list;
|
||||
unsigned int flags;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue