Commit 754a90d3 authored by Allan, Bruce W's avatar Allan, Bruce W Committed by Herbert Xu

crypto: qat - fix typo

adt_ctl_drv should be adf_ctl_drv
Signed-off-by: default avatarBruce Allan <bruce.w.allan@intel.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 6d7e7e02
...@@ -77,14 +77,14 @@ struct adf_ctl_drv_info { ...@@ -77,14 +77,14 @@ struct adf_ctl_drv_info {
struct class *drv_class; struct class *drv_class;
}; };
static struct adf_ctl_drv_info adt_ctl_drv; static struct adf_ctl_drv_info adf_ctl_drv;
static void adf_chr_drv_destroy(void) static void adf_chr_drv_destroy(void)
{ {
device_destroy(adt_ctl_drv.drv_class, MKDEV(adt_ctl_drv.major, 0)); device_destroy(adf_ctl_drv.drv_class, MKDEV(adf_ctl_drv.major, 0));
cdev_del(&adt_ctl_drv.drv_cdev); cdev_del(&adf_ctl_drv.drv_cdev);
class_destroy(adt_ctl_drv.drv_class); class_destroy(adf_ctl_drv.drv_class);
unregister_chrdev_region(MKDEV(adt_ctl_drv.major, 0), 1); unregister_chrdev_region(MKDEV(adf_ctl_drv.major, 0), 1);
} }
static int adf_chr_drv_create(void) static int adf_chr_drv_create(void)
...@@ -97,20 +97,20 @@ static int adf_chr_drv_create(void) ...@@ -97,20 +97,20 @@ static int adf_chr_drv_create(void)
return -EFAULT; return -EFAULT;
} }
adt_ctl_drv.drv_class = class_create(THIS_MODULE, DEVICE_NAME); adf_ctl_drv.drv_class = class_create(THIS_MODULE, DEVICE_NAME);
if (IS_ERR(adt_ctl_drv.drv_class)) { if (IS_ERR(adf_ctl_drv.drv_class)) {
pr_err("QAT: class_create failed for adf_ctl\n"); pr_err("QAT: class_create failed for adf_ctl\n");
goto err_chrdev_unreg; goto err_chrdev_unreg;
} }
adt_ctl_drv.major = MAJOR(dev_id); adf_ctl_drv.major = MAJOR(dev_id);
cdev_init(&adt_ctl_drv.drv_cdev, &adf_ctl_ops); cdev_init(&adf_ctl_drv.drv_cdev, &adf_ctl_ops);
if (cdev_add(&adt_ctl_drv.drv_cdev, dev_id, 1)) { if (cdev_add(&adf_ctl_drv.drv_cdev, dev_id, 1)) {
pr_err("QAT: cdev add failed\n"); pr_err("QAT: cdev add failed\n");
goto err_class_destr; goto err_class_destr;
} }
drv_device = device_create(adt_ctl_drv.drv_class, NULL, drv_device = device_create(adf_ctl_drv.drv_class, NULL,
MKDEV(adt_ctl_drv.major, 0), MKDEV(adf_ctl_drv.major, 0),
NULL, DEVICE_NAME); NULL, DEVICE_NAME);
if (IS_ERR(drv_device)) { if (IS_ERR(drv_device)) {
pr_err("QAT: failed to create device\n"); pr_err("QAT: failed to create device\n");
...@@ -118,9 +118,9 @@ static int adf_chr_drv_create(void) ...@@ -118,9 +118,9 @@ static int adf_chr_drv_create(void)
} }
return 0; return 0;
err_cdev_del: err_cdev_del:
cdev_del(&adt_ctl_drv.drv_cdev); cdev_del(&adf_ctl_drv.drv_cdev);
err_class_destr: err_class_destr:
class_destroy(adt_ctl_drv.drv_class); class_destroy(adf_ctl_drv.drv_class);
err_chrdev_unreg: err_chrdev_unreg:
unregister_chrdev_region(dev_id, 1); unregister_chrdev_region(dev_id, 1);
return -EFAULT; return -EFAULT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment