summaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel/iSeries_vio.c
diff options
context:
space:
mode:
authorStephen Rothwell2005-08-17 08:40:12 +0200
committerPaul Mackerras2005-08-30 05:23:47 +0200
commitb877b90f227fb9698d99fb70492d432362584082 (patch)
treeb58168217324bc07c8d6e7368246fa24ba7e96db /arch/ppc64/kernel/iSeries_vio.c
parent[PATCH] Formatting changes to vio.c (diff)
downloadkernel-qcow2-linux-b877b90f227fb9698d99fb70492d432362584082.tar.gz
kernel-qcow2-linux-b877b90f227fb9698d99fb70492d432362584082.tar.xz
kernel-qcow2-linux-b877b90f227fb9698d99fb70492d432362584082.zip
[PATCH] Create vio_register_device
Take some assignments out of vio_register_device_common and rename it to vio_register_device. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc64/kernel/iSeries_vio.c')
-rw-r--r--arch/ppc64/kernel/iSeries_vio.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/arch/ppc64/kernel/iSeries_vio.c b/arch/ppc64/kernel/iSeries_vio.c
index b4268cc4ba48..d0960a82708c 100644
--- a/arch/ppc64/kernel/iSeries_vio.c
+++ b/arch/ppc64/kernel/iSeries_vio.c
@@ -68,7 +68,7 @@ static void __init iommu_vio_init(void)
}
/**
- * vio_register_device: - Register a new vio device.
+ * vio_register_device_iseries: - Register a new iSeries vio device.
* @voidev: The device to register.
*/
static struct vio_dev *__init vio_register_device_iseries(char *type,
@@ -76,7 +76,7 @@ static struct vio_dev *__init vio_register_device_iseries(char *type,
{
struct vio_dev *viodev;
- /* allocate a vio_dev for this node */
+ /* allocate a vio_dev for this device */
viodev = kmalloc(sizeof(struct vio_dev), GFP_KERNEL);
if (!viodev)
return NULL;
@@ -84,8 +84,15 @@ static struct vio_dev *__init vio_register_device_iseries(char *type,
snprintf(viodev->dev.bus_id, BUS_ID_SIZE, "%s%d", type, unit_num);
- return vio_register_device_common(viodev, viodev->dev.bus_id, type,
- unit_num, &vio_iommu_table);
+ viodev->name = viodev->dev.bus_id;
+ viodev->type = type;
+ viodev->unit_address = unit_num;
+ viodev->iommu_table = &vio_iommu_table;
+ if (vio_register_device(viodev) == NULL) {
+ kfree(viodev);
+ return NULL;
+ }
+ return viodev;
}
void __init probe_bus_iseries(void)