Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 28685
b: refs/heads/master
c: dd721ff
h: refs/heads/master
i:
  28683: b0932e4
v: v3
  • Loading branch information
Stephen Rothwell authored and Paul Mackerras committed Apr 29, 2006
1 parent 8456659 commit 15b50b9
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 32 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: e10fa77368dff31140451fac04d78d9f51f0f3ac
refs/heads/master: dd721ffd95d5e1516380da0b254ef737582a258f
3 changes: 2 additions & 1 deletion trunk/arch/powerpc/kernel/vio.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ static const struct vio_device_id *vio_match_device(
const struct vio_device_id *ids, const struct vio_dev *dev)
{
while (ids->type[0] != '\0') {
if (vio_bus_ops.match(ids, dev))
if ((strncmp(dev->type, ids->type, strlen(ids->type)) == 0) &&
device_is_compatible(dev->dev.platform_data, ids->compat))
return ids;
ids++;
}
Expand Down
10 changes: 5 additions & 5 deletions trunk/arch/powerpc/platforms/iseries/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ void dt_vdevices(struct iseries_flat_dt *dt)
snprintf(buf, sizeof(buf), "viocons@%08x", reg);
dt_start_node(dt, buf);
dt_prop_str(dt, "device_type", "serial");
dt_prop_empty(dt, "compatible");
dt_prop_str(dt, "compatible", "");
dt_prop_u32(dt, "reg", reg);
dt_end_node(dt);
reg++;
Expand All @@ -949,7 +949,7 @@ void dt_vdevices(struct iseries_flat_dt *dt)
snprintf(buf, 32, "vlan@%08x", reg + i);
dt_start_node(dt, buf);
dt_prop_str(dt, "device_type", "vlan");
dt_prop_empty(dt, "compatible");
dt_prop_str(dt, "compatible", "");
dt_prop_u32(dt, "reg", reg + i);
dt_prop_u32(dt, "linux,unit_address", i);

Expand All @@ -970,7 +970,7 @@ void dt_vdevices(struct iseries_flat_dt *dt)
snprintf(buf, 32, "viodasd@%08x", reg + i);
dt_start_node(dt, buf);
dt_prop_str(dt, "device_type", "viodasd");
dt_prop_empty(dt, "compatible");
dt_prop_str(dt, "compatible", "");
dt_prop_u32(dt, "reg", reg + i);
dt_prop_u32(dt, "linux,unit_address", i);
dt_end_node(dt);
Expand All @@ -980,7 +980,7 @@ void dt_vdevices(struct iseries_flat_dt *dt)
snprintf(buf, 32, "viocd@%08x", reg + i);
dt_start_node(dt, buf);
dt_prop_str(dt, "device_type", "viocd");
dt_prop_empty(dt, "compatible");
dt_prop_str(dt, "compatible", "");
dt_prop_u32(dt, "reg", reg + i);
dt_prop_u32(dt, "linux,unit_address", i);
dt_end_node(dt);
Expand All @@ -990,7 +990,7 @@ void dt_vdevices(struct iseries_flat_dt *dt)
snprintf(buf, 32, "viotape@%08x", reg + i);
dt_start_node(dt, buf);
dt_prop_str(dt, "device_type", "viotape");
dt_prop_empty(dt, "compatible");
dt_prop_str(dt, "compatible", "");
dt_prop_u32(dt, "reg", reg + i);
dt_prop_u32(dt, "linux,unit_address", i);
dt_end_node(dt);
Expand Down
12 changes: 0 additions & 12 deletions trunk/arch/powerpc/platforms/iseries/vio.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,7 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)
return &vio_iommu_table;
}

/**
* vio_match_device_iseries: - Tell if a iSeries VIO device matches a
* vio_device_id
*/
static int vio_match_device_iseries(const struct vio_device_id *id,
const struct vio_dev *dev)
{
return strncmp(dev->type, id->type, strlen(id->type)) == 0;
}

static struct vio_bus_ops vio_bus_ops_iseries = {
.match = vio_match_device_iseries,
.build_iommu_table = vio_build_iommu_table,
};

Expand All @@ -75,5 +64,4 @@ static int __init vio_bus_init_iseries(void)
iSeries_vio_dev = &vio_bus_device.dev;
return vio_bus_init(&vio_bus_ops_iseries);
}

__initcall(vio_bus_init_iseries);
12 changes: 0 additions & 12 deletions trunk/arch/powerpc/platforms/pseries/vio.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,6 @@

extern struct subsystem devices_subsys; /* needed for vio_find_name() */

/**
* vio_match_device_pseries: - Tell if a pSeries VIO device matches a
* vio_device_id
*/
static int vio_match_device_pseries(const struct vio_device_id *id,
const struct vio_dev *dev)
{
return (strncmp(dev->type, id->type, strlen(id->type)) == 0) &&
device_is_compatible(dev->dev.platform_data, id->compat);
}

/**
* vio_build_iommu_table: - gets the dma information from OF and
* builds the TCE tree.
Expand Down Expand Up @@ -76,7 +65,6 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)
}

static struct vio_bus_ops vio_bus_ops_pseries = {
.match = vio_match_device_pseries,
.build_iommu_table = vio_build_iommu_table,
};

Expand Down
1 change: 0 additions & 1 deletion trunk/include/asm-powerpc/vio.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ struct vio_driver {
};

struct vio_bus_ops {
int (*match)(const struct vio_device_id *id, const struct vio_dev *dev);
struct iommu_table *(*build_iommu_table)(struct vio_dev *dev);
};

Expand Down

0 comments on commit 15b50b9

Please sign in to comment.