[openib-general] [PATCH] kernel 2.6.14 problems
John Kingman
kingman at austin.rr.com
Tue Nov 8 15:28:17 PST 2005
It appears that class_device_create has changed for some recent levels of
2.6.14 (e.g., 2.6.14-mm1).
The symptoms include build warning messages about create_device_class
parameters on compiles of uat.c, user_mad.c, and uverbs_main.c.
The following patches work for me.
Signed-off-by: John Kingman <kingman at storagegear.com>
Index: uat.c
===================================================================
--- uat.c (revision 3991)
+++ uat.c (working copy)
@@ -834,7 +834,7 @@ static int __init ib_uat_init(void)
goto err_class;
}
- class_device_create(ib_uat_class, IB_UAT_DEV, NULL, "uat");
+ class_device_create(ib_uat_class, NULL, IB_UAT_DEV, NULL, "uat");
idr_init(&ctx_id_table);
init_MUTEX(&ctx_id_mutex);
Index: user_mad.c
===================================================================
--- user_mad.c (revision 3991)
+++ user_mad.c (working copy)
@@ -790,7 +790,7 @@ static int ib_umad_init_port(struct ib_d
if (cdev_add(port->dev, base_dev + port->dev_num, 1))
goto err_cdev;
- port->class_dev = class_device_create(umad_class, port->dev->dev,
+ port->class_dev = class_device_create(umad_class, NULL, port->dev->dev,
device->dma_device,
"umad%d", port->dev_num);
if (IS_ERR(port->class_dev))
@@ -810,7 +810,7 @@ static int ib_umad_init_port(struct ib_d
if (cdev_add(port->sm_dev, base_dev + port->dev_num + IB_UMAD_MAX_PORTS, 1))
goto err_sm_cdev;
- port->sm_class_dev = class_device_create(umad_class, port->sm_dev->dev,
+ port->sm_class_dev = class_device_create(umad_class, NULL, port->sm_dev->dev,
device->dma_device,
"issm%d", port->dev_num);
if (IS_ERR(port->sm_class_dev))
Index: uverbs_main.c
===================================================================
--- uverbs_main.c (revision 3991)
+++ uverbs_main.c (working copy)
@@ -752,7 +752,7 @@ static void ib_uverbs_add_one(struct ib_
if (cdev_add(uverbs_dev->dev, IB_UVERBS_BASE_DEV + uverbs_dev->devnum, 1))
goto err_cdev;
- uverbs_dev->class_dev = class_device_create(uverbs_class, uverbs_dev->dev->dev,
+ uverbs_dev->class_dev = class_device_create(uverbs_class, NULL, uverbs_dev->dev->dev,
device->dma_device,
"uverbs%d", uverbs_dev->devnum);
if (IS_ERR(uverbs_dev->class_dev))
More information about the general
mailing list