Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 2512
b: refs/heads/master
c: ac5b33c
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Rothwell authored and Linus Torvalds committed Jun 22, 2005
1 parent 0605107 commit 34147db
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 22 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: 145d01e4287b8cbf50f87c3283e33bf5c84e8468
refs/heads/master: ac5b33c9bcf1c05ae949b026a51d7f8f9573591c
37 changes: 16 additions & 21 deletions trunk/arch/ppc64/kernel/vio.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,25 @@ static const struct vio_device_id *vio_match_device(
static struct iommu_table *vio_build_iommu_table(struct vio_dev *);
static int vio_num_address_cells;
#endif
static struct vio_dev *vio_bus_device; /* fake "parent" device */

#ifdef CONFIG_PPC_ISERIES
static struct vio_dev *__init vio_register_device_iseries(char *type,
uint32_t unit_num);

static struct iommu_table veth_iommu_table;
static struct iommu_table vio_iommu_table;

static struct vio_dev _vio_dev = {
#endif
static struct vio_dev vio_bus_device = { /* fake "parent" device */
.name = vio_bus_device.dev.bus_id,
.type = "",
#ifdef CONFIG_PPC_ISERIES
.iommu_table = &vio_iommu_table,
.dev.bus = &vio_bus_type
#endif
.dev.bus_id = "vio",
.dev.bus = &vio_bus_type,
};
struct device *iSeries_vio_dev = &_vio_dev.dev;

#ifdef CONFIG_PPC_ISERIES
static struct vio_dev *__init vio_register_device_iseries(char *type,
uint32_t unit_num);

struct device *iSeries_vio_dev = &vio_bus_device.dev;
EXPORT_SYMBOL(iSeries_vio_dev);

#define device_is_compatible(a, b) 1
Expand Down Expand Up @@ -260,18 +265,10 @@ static int __init vio_bus_init(void)
}

/* the fake parent of all vio devices, just to give us a nice directory */
vio_bus_device = kmalloc(sizeof(struct vio_dev), GFP_KERNEL);
if (!vio_bus_device) {
return 1;
}
memset(vio_bus_device, 0, sizeof(struct vio_dev));
strcpy(vio_bus_device->dev.bus_id, "vio");

err = device_register(&vio_bus_device->dev);
err = device_register(&vio_bus_device.dev);
if (err) {
printk(KERN_WARNING "%s: device_register returned %i\n", __FUNCTION__,
err);
kfree(vio_bus_device);
return err;
}

Expand Down Expand Up @@ -326,7 +323,7 @@ static struct vio_dev * __devinit vio_register_device_common(
viodev->unit_address = unit_address;
viodev->iommu_table = iommu_table;
/* init generic 'struct device' fields: */
viodev->dev.parent = &vio_bus_device->dev;
viodev->dev.parent = &vio_bus_device.dev;
viodev->dev.bus = &vio_bus_type;
viodev->dev.release = vio_dev_release;

Expand Down Expand Up @@ -636,5 +633,3 @@ struct bus_type vio_bus_type = {
.name = "vio",
.match = vio_bus_match,
};

EXPORT_SYMBOL(vio_bus_type);

0 comments on commit 34147db

Please sign in to comment.