From 4c9c46df76a78b53ba8a47cdbb5b0e8c9d11bc6e Mon Sep 17 00:00:00 2001 From: Daniel Hellstrom Date: Mon, 13 Apr 2015 12:58:37 +0200 Subject: DRVMGR: clean-up DRV_OPS_NUM --- cpukit/libdrvmgr/drvmgr_print.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cpukit/libdrvmgr/drvmgr_print.c') diff --git a/cpukit/libdrvmgr/drvmgr_print.c b/cpukit/libdrvmgr/drvmgr_print.c index aecf41c641..2b7a2e538e 100644 --- a/cpukit/libdrvmgr/drvmgr_print.c +++ b/cpukit/libdrvmgr/drvmgr_print.c @@ -334,7 +334,7 @@ void drvmgr_info_bus(struct drvmgr_bus *bus, unsigned int options) } } -char *drv_ops_names[DRV_OPS_NUM] = { +char *drv_ops_names[DRVMGR_OPS_NUM(struct drvmgr_drv_ops)] = { "init[1]:", "init[2]:", "init[3]:", @@ -355,7 +355,8 @@ void drvmgr_info_drv(struct drvmgr_drv *drv, unsigned int options) printf(" NAME: %s\n", drv->name ? drv->name : "NO_NAME"); printf(" BUS TYPE: %d\n", drv->bus_type); printf(" OPERATIONS:\n"); - for (i = 0, ppfunc = (fun_ptr *)&drv->ops->init[0]; iops->init[0]; + i < DRVMGR_OPS_NUM(struct drvmgr_drv_ops); i++) printf(" %s %p\n", drv_ops_names[i], ppfunc[i]); printf(" NO. DEVICES: %d\n", drv->dev_cnt); -- cgit v1.2.3