diff options
Diffstat (limited to 'drivers/md/linear.c')
-rw-r--r-- | drivers/md/linear.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c index 946efef3a8f5..777585458c85 100644 --- a/drivers/md/linear.c +++ b/drivers/md/linear.c | |||
@@ -121,11 +121,10 @@ static int linear_run (mddev_t *mddev) | |||
121 | sector_t curr_offset; | 121 | sector_t curr_offset; |
122 | struct list_head *tmp; | 122 | struct list_head *tmp; |
123 | 123 | ||
124 | conf = kmalloc (sizeof (*conf) + mddev->raid_disks*sizeof(dev_info_t), | 124 | conf = kzalloc (sizeof (*conf) + mddev->raid_disks*sizeof(dev_info_t), |
125 | GFP_KERNEL); | 125 | GFP_KERNEL); |
126 | if (!conf) | 126 | if (!conf) |
127 | goto out; | 127 | goto out; |
128 | memset(conf, 0, sizeof(*conf) + mddev->raid_disks*sizeof(dev_info_t)); | ||
129 | mddev->private = conf; | 128 | mddev->private = conf; |
130 | 129 | ||
131 | cnt = 0; | 130 | cnt = 0; |
@@ -352,9 +351,10 @@ static void linear_status (struct seq_file *seq, mddev_t *mddev) | |||
352 | } | 351 | } |
353 | 352 | ||
354 | 353 | ||
355 | static mdk_personality_t linear_personality= | 354 | static struct mdk_personality linear_personality = |
356 | { | 355 | { |
357 | .name = "linear", | 356 | .name = "linear", |
357 | .level = LEVEL_LINEAR, | ||
358 | .owner = THIS_MODULE, | 358 | .owner = THIS_MODULE, |
359 | .make_request = linear_make_request, | 359 | .make_request = linear_make_request, |
360 | .run = linear_run, | 360 | .run = linear_run, |
@@ -364,16 +364,18 @@ static mdk_personality_t linear_personality= | |||
364 | 364 | ||
365 | static int __init linear_init (void) | 365 | static int __init linear_init (void) |
366 | { | 366 | { |
367 | return register_md_personality (LINEAR, &linear_personality); | 367 | return register_md_personality (&linear_personality); |
368 | } | 368 | } |
369 | 369 | ||
370 | static void linear_exit (void) | 370 | static void linear_exit (void) |
371 | { | 371 | { |
372 | unregister_md_personality (LINEAR); | 372 | unregister_md_personality (&linear_personality); |
373 | } | 373 | } |
374 | 374 | ||
375 | 375 | ||
376 | module_init(linear_init); | 376 | module_init(linear_init); |
377 | module_exit(linear_exit); | 377 | module_exit(linear_exit); |
378 | MODULE_LICENSE("GPL"); | 378 | MODULE_LICENSE("GPL"); |
379 | MODULE_ALIAS("md-personality-1"); /* LINEAR */ | 379 | MODULE_ALIAS("md-personality-1"); /* LINEAR - deprecated*/ |
380 | MODULE_ALIAS("md-linear"); | ||
381 | MODULE_ALIAS("md-level--1"); | ||