aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/parport.h
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2007-05-08 03:27:35 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 14:15:05 -0400
commitc15a3837d2aa30e3ea41aed49d80abed355ab6bd (patch)
tree23da1c16c1e73ac5679f81c3264fc0faeb92fcf2 /include/linux/parport.h
parentd2d9433a4c84c9e7ed78d633fdbffb35d5afda17 (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 'include/linux/parport.h')
-rw-r--r--include/linux/parport.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/parport.h b/include/linux/parport.h
index 80682aaa8f18..9cdd6943e01b 100644
--- a/include/linux/parport.h
+++ b/include/linux/parport.h
@@ -279,6 +279,10 @@ struct parport {
279 int dma; 279 int dma;
280 int muxport; /* which muxport (if any) this is */ 280 int muxport; /* which muxport (if any) this is */
281 int portnum; /* which physical parallel port (not mux) */ 281 int portnum; /* which physical parallel port (not mux) */
282 struct device *dev; /* Physical device associated with IO/DMA.
283 * This may unfortulately be null if the
284 * port has a legacy driver.
285 */
282 286
283 struct parport *physport; 287 struct parport *physport;
284 /* If this is a non-default mux 288 /* If this is a non-default mux
@@ -289,7 +293,7 @@ struct parport {
289 following structure members are 293 following structure members are
290 meaningless: devices, cad, muxsel, 294 meaningless: devices, cad, muxsel,
291 waithead, waittail, flags, pdir, 295 waithead, waittail, flags, pdir,
292 ieee1284, *_lock. 296 dev, ieee1284, *_lock.
293 297
294 It this is a default mux parport, or 298 It this is a default mux parport, or
295 there is no mux involved, this points to 299 there is no mux involved, this points to
@@ -302,7 +306,7 @@ struct parport {
302 306
303 struct pardevice *waithead; 307 struct pardevice *waithead;
304 struct pardevice *waittail; 308 struct pardevice *waittail;
305 309
306 struct list_head list; 310 struct list_head list;
307 unsigned int flags; 311 unsigned int flags;
308 312