summaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel/pSeries_vio.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2005-08-17 08:41:44 +0200
committerPaul Mackerras <paulus@samba.org>2005-08-30 05:23:47 +0200
commit71d276d751ff5ddba28312aecefb174b20a5b970 (patch)
tree1d2262f427fb0e117d0ad464eaf3375373e166f8 /arch/ppc64/kernel/pSeries_vio.c
parent[PATCH] Create vio_register_device (diff)
downloadlinux-71d276d751ff5ddba28312aecefb174b20a5b970.tar.xz
linux-71d276d751ff5ddba28312aecefb174b20a5b970.zip
[PATCH] Create vio_bus_ops
Create vio_bus_ops so that we just pass a structure to vio_bus_init instead of three separate function pointers. Rearrange vio.h to avoid forward references. vio.h only needs struct device_node from prom.h so remove the include and just declare it. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc64/kernel/pSeries_vio.c')
-rw-r--r--arch/ppc64/kernel/pSeries_vio.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/ppc64/kernel/pSeries_vio.c b/arch/ppc64/kernel/pSeries_vio.c
index 81e94f8aa846..e0ae06f58f86 100644
--- a/arch/ppc64/kernel/pSeries_vio.c
+++ b/arch/ppc64/kernel/pSeries_vio.c
@@ -76,6 +76,12 @@ static void vio_unregister_device_pseries(struct vio_dev *viodev)
device_remove_file(&viodev->dev, &dev_attr_devspec);
}
+static struct vio_bus_ops vio_bus_ops_pseries = {
+ .match = vio_match_device_pseries,
+ .unregister_device = vio_unregister_device_pseries,
+ .release_device = vio_release_device_pseries,
+};
+
/**
* vio_bus_init_pseries: - Initialize the pSeries virtual IO bus
*/
@@ -83,9 +89,7 @@ static int __init vio_bus_init_pseries(void)
{
int err;
- err = vio_bus_init(vio_match_device_pseries,
- vio_unregister_device_pseries,
- vio_release_device_pseries);
+ err = vio_bus_init(&vio_bus_ops_pseries);
if (err == 0)
probe_bus_pseries();
return err;