diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2008-07-14 03:59:03 -0400 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2008-07-14 04:02:12 -0400 |
commit | f08adc008d84f6b03d377ede951e29ed169e76e2 (patch) | |
tree | 5c8c90f6b3710a4f04f23d25e735ce4108fdc553 /drivers/s390/cio/css.c | |
parent | 99611f87176b2a908d8c66ab19a5fc550a3cd13a (diff) |
[S390] css: Use css_device_id for bus matching.
css_device_id exists, so use it for determining the right driver
(and add a match_flags which is always 1 for valid types).
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/css.c')
-rw-r--r-- | drivers/s390/cio/css.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 45ba07c0a286..4e2f2bbf4ba5 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c | |||
@@ -850,19 +850,16 @@ int sch_is_pseudo_sch(struct subchannel *sch) | |||
850 | return sch == to_css(sch->dev.parent)->pseudo_subchannel; | 850 | return sch == to_css(sch->dev.parent)->pseudo_subchannel; |
851 | } | 851 | } |
852 | 852 | ||
853 | /* | 853 | static int css_bus_match(struct device *dev, struct device_driver *drv) |
854 | * find a driver for a subchannel. They identify by the subchannel | ||
855 | * type with the exception that the console subchannel driver has its own | ||
856 | * subchannel type although the device is an i/o subchannel | ||
857 | */ | ||
858 | static int | ||
859 | css_bus_match (struct device *dev, struct device_driver *drv) | ||
860 | { | 854 | { |
861 | struct subchannel *sch = to_subchannel(dev); | 855 | struct subchannel *sch = to_subchannel(dev); |
862 | struct css_driver *driver = to_cssdriver(drv); | 856 | struct css_driver *driver = to_cssdriver(drv); |
857 | struct css_device_id *id; | ||
863 | 858 | ||
864 | if (sch->st == driver->subchannel_type) | 859 | for (id = driver->subchannel_type; id->match_flags; id++) { |
865 | return 1; | 860 | if (sch->st == id->type) |
861 | return 1; | ||
862 | } | ||
866 | 863 | ||
867 | return 0; | 864 | return 0; |
868 | } | 865 | } |