Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98971
b: refs/heads/master
c: f08adc0
h: refs/heads/master
i:
  98969: 20049e6
  98967: ce159be
v: v3
  • Loading branch information
Cornelia Huck authored and Heiko Carstens committed Jul 14, 2008
1 parent f883274 commit 4e696cc
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 99611f87176b2a908d8c66ab19a5fc550a3cd13a
refs/heads/master: f08adc008d84f6b03d377ede951e29ed169e76e2
15 changes: 6 additions & 9 deletions trunk/drivers/s390/cio/css.c
Original file line number Diff line number Diff line change
Expand Up @@ -850,19 +850,16 @@ int sch_is_pseudo_sch(struct subchannel *sch)
return sch == to_css(sch->dev.parent)->pseudo_subchannel;
}

/*
* find a driver for a subchannel. They identify by the subchannel
* type with the exception that the console subchannel driver has its own
* subchannel type although the device is an i/o subchannel
*/
static int
css_bus_match (struct device *dev, struct device_driver *drv)
static int css_bus_match(struct device *dev, struct device_driver *drv)
{
struct subchannel *sch = to_subchannel(dev);
struct css_driver *driver = to_cssdriver(drv);
struct css_device_id *id;

if (sch->st == driver->subchannel_type)
return 1;
for (id = driver->subchannel_type; id->match_flags; id++) {
if (sch->st == id->type)
return 1;
}

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/s390/cio/css.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ struct chp_link;
*/
struct css_driver {
struct module *owner;
unsigned int subchannel_type;
struct css_device_id *subchannel_type;
struct device_driver drv;
void (*irq)(struct subchannel *);
int (*chp_event)(struct subchannel *, struct chp_link *, int);
Expand Down
8 changes: 7 additions & 1 deletion trunk/drivers/s390/cio/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,15 @@ static int io_subchannel_sch_event(struct subchannel *, int);
static int io_subchannel_chp_event(struct subchannel *, struct chp_link *,
int);

static struct css_device_id io_subchannel_ids[] = {
{ .match_flags = 0x1, .type = SUBCHANNEL_TYPE_IO, },
{ /* end of list */ },
};
MODULE_DEVICE_TABLE(css, io_subchannel_ids);

static struct css_driver io_subchannel_driver = {
.owner = THIS_MODULE,
.subchannel_type = SUBCHANNEL_TYPE_IO,
.subchannel_type = io_subchannel_ids,
.name = "io_subchannel",
.irq = io_subchannel_irq,
.sch_event = io_subchannel_sch_event,
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/mod_devicetable.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ struct ap_device_id {

/* s390 css bus devices (subchannels) */
struct css_device_id {
__u8 match_flags;
__u8 type; /* subchannel type */
__u8 pad1;
__u16 pad2;
__u32 pad3;
kernel_ulong_t driver_data;
Expand Down

0 comments on commit 4e696cc

Please sign in to comment.