提交 91bd418f 编写于 作者: G Greg Kroah-Hartman

device create: infiniband: convert device_create_drvdata to device_create

Now that device_create() has been audited, rename things back to the
original call to be sane.

Cc: Roland Dreier <rolandd@cisco.com>
Cc: Sean Hefty <sean.hefty@intel.com>
Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 6229df31
...@@ -3691,7 +3691,7 @@ static void cm_add_one(struct ib_device *ib_device) ...@@ -3691,7 +3691,7 @@ static void cm_add_one(struct ib_device *ib_device)
cm_dev->ib_device = ib_device; cm_dev->ib_device = ib_device;
cm_get_ack_delay(cm_dev); cm_get_ack_delay(cm_dev);
cm_dev->device = device_create_drvdata(&cm_class, &ib_device->dev, cm_dev->device = device_create(&cm_class, &ib_device->dev,
MKDEV(0, 0), NULL, MKDEV(0, 0), NULL,
"%s", ib_device->name); "%s", ib_device->name);
if (!cm_dev->device) { if (!cm_dev->device) {
......
...@@ -1016,7 +1016,7 @@ static int ib_umad_init_port(struct ib_device *device, int port_num, ...@@ -1016,7 +1016,7 @@ static int ib_umad_init_port(struct ib_device *device, int port_num,
if (cdev_add(port->cdev, base_dev + port->dev_num, 1)) if (cdev_add(port->cdev, base_dev + port->dev_num, 1))
goto err_cdev; goto err_cdev;
port->dev = device_create_drvdata(umad_class, device->dma_device, port->dev = device_create(umad_class, device->dma_device,
port->cdev->dev, port, port->cdev->dev, port,
"umad%d", port->dev_num); "umad%d", port->dev_num);
if (IS_ERR(port->dev)) if (IS_ERR(port->dev))
...@@ -1036,7 +1036,7 @@ static int ib_umad_init_port(struct ib_device *device, int port_num, ...@@ -1036,7 +1036,7 @@ static int ib_umad_init_port(struct ib_device *device, int port_num,
if (cdev_add(port->sm_cdev, base_dev + port->dev_num + IB_UMAD_MAX_PORTS, 1)) if (cdev_add(port->sm_cdev, base_dev + port->dev_num + IB_UMAD_MAX_PORTS, 1))
goto err_sm_cdev; goto err_sm_cdev;
port->sm_dev = device_create_drvdata(umad_class, device->dma_device, port->sm_dev = device_create(umad_class, device->dma_device,
port->sm_cdev->dev, port, port->sm_cdev->dev, port,
"issm%d", port->dev_num); "issm%d", port->dev_num);
if (IS_ERR(port->sm_dev)) if (IS_ERR(port->sm_dev))
......
...@@ -764,12 +764,9 @@ static void ib_uverbs_add_one(struct ib_device *device) ...@@ -764,12 +764,9 @@ static void ib_uverbs_add_one(struct ib_device *device)
if (cdev_add(uverbs_dev->cdev, IB_UVERBS_BASE_DEV + uverbs_dev->devnum, 1)) if (cdev_add(uverbs_dev->cdev, IB_UVERBS_BASE_DEV + uverbs_dev->devnum, 1))
goto err_cdev; goto err_cdev;
uverbs_dev->dev = device_create_drvdata(uverbs_class, uverbs_dev->dev = device_create(uverbs_class, device->dma_device,
device->dma_device, uverbs_dev->cdev->dev, uverbs_dev,
uverbs_dev->cdev->dev, "uverbs%d", uverbs_dev->devnum);
uverbs_dev,
"uverbs%d",
uverbs_dev->devnum);
if (IS_ERR(uverbs_dev->dev)) if (IS_ERR(uverbs_dev->dev))
goto err_cdev; goto err_cdev;
......
...@@ -2455,7 +2455,7 @@ static int init_cdev(int minor, char *name, const struct file_operations *fops, ...@@ -2455,7 +2455,7 @@ static int init_cdev(int minor, char *name, const struct file_operations *fops,
goto err_cdev; goto err_cdev;
} }
device = device_create_drvdata(ipath_class, NULL, dev, NULL, name); device = device_create(ipath_class, NULL, dev, NULL, name);
if (IS_ERR(device)) { if (IS_ERR(device)) {
ret = PTR_ERR(device); ret = PTR_ERR(device);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册