diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2011-03-15 12:08:26 -0400 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2011-03-15 12:08:23 -0400 |
commit | 97eb6bfcb942a59f5c8d273523d68c6a0f57a6f2 (patch) | |
tree | 44cd256317b24d94f0affa848167ac6b26707afb /drivers/s390 | |
parent | c513d07a2df0f7076c1707274e29737f09df3b7f (diff) |
[S390] cio: move cdev pointer to io_subchannel_private
Move the subchannels ccw device pointer from drv_data to
the private data for I/O subchannels, since it is not the
only drv_data for I/O subchannels. The next step will be
to make io_subchannel_private the new drv_data for I/O
subchannels.
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/cio/io_sch.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/s390/cio/io_sch.h b/drivers/s390/cio/io_sch.h index 8271a1f9860c..23f50ba50392 100644 --- a/drivers/s390/cio/io_sch.h +++ b/drivers/s390/cio/io_sch.h | |||
@@ -10,6 +10,7 @@ | |||
10 | struct io_subchannel_private { | 10 | struct io_subchannel_private { |
11 | union orb orb; /* operation request block */ | 11 | union orb orb; /* operation request block */ |
12 | struct ccw1 sense_ccw; /* static ccw for sense command */ | 12 | struct ccw1 sense_ccw; /* static ccw for sense command */ |
13 | struct ccw_device *cdev;/* pointer to the child ccw device */ | ||
13 | struct { | 14 | struct { |
14 | unsigned int suspend:1; /* allow suspend */ | 15 | unsigned int suspend:1; /* allow suspend */ |
15 | unsigned int prefetch:1;/* deny prefetch */ | 16 | unsigned int prefetch:1;/* deny prefetch */ |
@@ -18,8 +19,20 @@ struct io_subchannel_private { | |||
18 | } __aligned(8); | 19 | } __aligned(8); |
19 | 20 | ||
20 | #define to_io_private(n) ((struct io_subchannel_private *)n->private) | 21 | #define to_io_private(n) ((struct io_subchannel_private *)n->private) |
21 | #define sch_get_cdev(n) (dev_get_drvdata(&n->dev)) | 22 | |
22 | #define sch_set_cdev(n, c) (dev_set_drvdata(&n->dev, c)) | 23 | static inline struct ccw_device *sch_get_cdev(struct subchannel *sch) |
24 | { | ||
25 | struct io_subchannel_private *priv = to_io_private(sch); | ||
26 | return priv ? priv->cdev : NULL; | ||
27 | } | ||
28 | |||
29 | static inline void sch_set_cdev(struct subchannel *sch, | ||
30 | struct ccw_device *cdev) | ||
31 | { | ||
32 | struct io_subchannel_private *priv = to_io_private(sch); | ||
33 | if (priv) | ||
34 | priv->cdev = cdev; | ||
35 | } | ||
23 | 36 | ||
24 | #define MAX_CIWS 8 | 37 | #define MAX_CIWS 8 |
25 | 38 | ||