diff options
author | David Brownell <david-b@pacbell.net> | 2007-05-08 03:27:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:15:05 -0400 |
commit | c15a3837d2aa30e3ea41aed49d80abed355ab6bd (patch) | |
tree | 23da1c16c1e73ac5679f81c3264fc0faeb92fcf2 /drivers/parport/share.c | |
parent | d2d9433a4c84c9e7ed78d633fdbffb35d5afda17 (diff) |
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>
Diffstat (limited to 'drivers/parport/share.c')
-rw-r--r-- | drivers/parport/share.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/parport/share.c b/drivers/parport/share.c index fd9129e424f9..cd66442acfee 100644 --- a/drivers/parport/share.c +++ b/drivers/parport/share.c | |||
@@ -365,6 +365,11 @@ void parport_announce_port (struct parport *port) | |||
365 | parport_daisy_init(port); | 365 | parport_daisy_init(port); |
366 | #endif | 366 | #endif |
367 | 367 | ||
368 | if (!port->dev) | ||
369 | printk(KERN_WARNING "%s: fix this legacy " | ||
370 | "no-device port driver!\n", | ||
371 | port->name); | ||
372 | |||
368 | parport_proc_register(port); | 373 | parport_proc_register(port); |
369 | mutex_lock(®istration_lock); | 374 | mutex_lock(®istration_lock); |
370 | spin_lock_irq(&parportlist_lock); | 375 | spin_lock_irq(&parportlist_lock); |