diff options
| author | Denis Cheng <crquan@gmail.com> | 2008-01-29 00:50:16 -0500 |
|---|---|---|
| committer | David Teigland <teigland@redhat.com> | 2008-01-30 12:04:43 -0500 |
| commit | 0fe410d3f3b1496190f37ef74cd089229cef97fa (patch) | |
| tree | b2f931b89348c45be3f8476f2b005464817e335a | |
| parent | dbcfc34733d1ae37e7a78c9e4e5325451223a5eb (diff) | |
dlm: static initialization improvements
also change name_prefix from char pointer to char array.
Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: David Teigland <teigland@redhat.com>
| -rw-r--r-- | fs/dlm/user.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/dlm/user.c b/fs/dlm/user.c index 1acb4c5813cd..7cbc6826239b 100644 --- a/fs/dlm/user.c +++ b/fs/dlm/user.c | |||
| @@ -24,8 +24,7 @@ | |||
| 24 | #include "lvb_table.h" | 24 | #include "lvb_table.h" |
| 25 | #include "user.h" | 25 | #include "user.h" |
| 26 | 26 | ||
| 27 | static const char *name_prefix="dlm"; | 27 | static const char name_prefix[] = "dlm"; |
| 28 | static struct miscdevice ctl_device; | ||
| 29 | static const struct file_operations device_fops; | 28 | static const struct file_operations device_fops; |
| 30 | 29 | ||
| 31 | #ifdef CONFIG_COMPAT | 30 | #ifdef CONFIG_COMPAT |
| @@ -902,14 +901,16 @@ static const struct file_operations ctl_device_fops = { | |||
| 902 | .owner = THIS_MODULE, | 901 | .owner = THIS_MODULE, |
| 903 | }; | 902 | }; |
| 904 | 903 | ||
| 904 | static struct miscdevice ctl_device = { | ||
| 905 | .name = "dlm-control", | ||
| 906 | .fops = &ctl_device_fops, | ||
| 907 | .minor = MISC_DYNAMIC_MINOR, | ||
| 908 | }; | ||
| 909 | |||
| 905 | int dlm_user_init(void) | 910 | int dlm_user_init(void) |
| 906 | { | 911 | { |
| 907 | int error; | 912 | int error; |
| 908 | 913 | ||
| 909 | ctl_device.name = "dlm-control"; | ||
| 910 | ctl_device.fops = &ctl_device_fops; | ||
| 911 | ctl_device.minor = MISC_DYNAMIC_MINOR; | ||
| 912 | |||
| 913 | error = misc_register(&ctl_device); | 914 | error = misc_register(&ctl_device); |
| 914 | if (error) | 915 | if (error) |
| 915 | log_print("misc_register failed for control device"); | 916 | log_print("misc_register failed for control device"); |
