|
@@ -1249,8 +1249,8 @@ static int tap_list_add(dev_t major, const char *device_name)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-int tap_create_cdev(struct cdev *tap_cdev,
|
|
|
- dev_t *tap_major, const char *device_name)
|
|
|
+int tap_create_cdev(struct cdev *tap_cdev, dev_t *tap_major,
|
|
|
+ const char *device_name, struct module *module)
|
|
|
{
|
|
|
int err;
|
|
|
|
|
@@ -1259,6 +1259,7 @@ int tap_create_cdev(struct cdev *tap_cdev,
|
|
|
goto out1;
|
|
|
|
|
|
cdev_init(tap_cdev, &tap_fops);
|
|
|
+ tap_cdev->owner = module;
|
|
|
err = cdev_add(tap_cdev, *tap_major, TAP_NUM_DEVS);
|
|
|
if (err)
|
|
|
goto out2;
|