diff options
-rw-r--r-- | drivers/s390/cio/css.c | 15 | ||||
-rw-r--r-- | drivers/s390/cio/css.h | 2 | ||||
-rw-r--r-- | drivers/s390/cio/device.c | 8 | ||||
-rw-r--r-- | include/linux/mod_devicetable.h | 2 |
4 files changed, 15 insertions, 12 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 | } |
diff --git a/drivers/s390/cio/css.h b/drivers/s390/cio/css.h index 38bf9ddb8412..58020bf41ed0 100644 --- a/drivers/s390/cio/css.h +++ b/drivers/s390/cio/css.h | |||
@@ -75,7 +75,7 @@ struct chp_link; | |||
75 | */ | 75 | */ |
76 | struct css_driver { | 76 | struct css_driver { |
77 | struct module *owner; | 77 | struct module *owner; |
78 | unsigned int subchannel_type; | 78 | struct css_device_id *subchannel_type; |
79 | struct device_driver drv; | 79 | struct device_driver drv; |
80 | void (*irq)(struct subchannel *); | 80 | void (*irq)(struct subchannel *); |
81 | int (*chp_event)(struct subchannel *, struct chp_link *, int); | 81 | int (*chp_event)(struct subchannel *, struct chp_link *, int); |
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 522d47afc950..c904cb84d75e 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
@@ -131,9 +131,15 @@ static int io_subchannel_sch_event(struct subchannel *, int); | |||
131 | static int io_subchannel_chp_event(struct subchannel *, struct chp_link *, | 131 | static int io_subchannel_chp_event(struct subchannel *, struct chp_link *, |
132 | int); | 132 | int); |
133 | 133 | ||
134 | static struct css_device_id io_subchannel_ids[] = { | ||
135 | { .match_flags = 0x1, .type = SUBCHANNEL_TYPE_IO, }, | ||
136 | { /* end of list */ }, | ||
137 | }; | ||
138 | MODULE_DEVICE_TABLE(css, io_subchannel_ids); | ||
139 | |||
134 | static struct css_driver io_subchannel_driver = { | 140 | static struct css_driver io_subchannel_driver = { |
135 | .owner = THIS_MODULE, | 141 | .owner = THIS_MODULE, |
136 | .subchannel_type = SUBCHANNEL_TYPE_IO, | 142 | .subchannel_type = io_subchannel_ids, |
137 | .name = "io_subchannel", | 143 | .name = "io_subchannel", |
138 | .irq = io_subchannel_irq, | 144 | .irq = io_subchannel_irq, |
139 | .sch_event = io_subchannel_sch_event, | 145 | .sch_event = io_subchannel_sch_event, |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 1fd03e732e07..c4db5827963d 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -161,8 +161,8 @@ struct ap_device_id { | |||
161 | 161 | ||
162 | /* s390 css bus devices (subchannels) */ | 162 | /* s390 css bus devices (subchannels) */ |
163 | struct css_device_id { | 163 | struct css_device_id { |
164 | __u8 match_flags; | ||
164 | __u8 type; /* subchannel type */ | 165 | __u8 type; /* subchannel type */ |
165 | __u8 pad1; | ||
166 | __u16 pad2; | 166 | __u16 pad2; |
167 | __u32 pad3; | 167 | __u32 pad3; |
168 | kernel_ulong_t driver_data; | 168 | kernel_ulong_t driver_data; |