|
75 | 75 | * ->nofua Flag specifying that FUA flag in SCSI WRITE(10,12) |
76 | 76 | * commands for this LUN shall be ignored. |
77 | 77 | * |
78 | | - * lun_name_format A printf-like format for names of the LUN |
79 | | - * devices. This determines how the |
80 | | - * directory in sysfs will be named. |
81 | | - * Unless you are using several MSFs in |
82 | | - * a single gadget (as opposed to single |
83 | | - * MSF in many configurations) you may |
84 | | - * leave it as NULL (in which case |
85 | | - * "lun%d" will be used). In the format |
86 | | - * you can use "%d" to index LUNs for |
87 | | - * MSF's with more than one LUN. (Beware |
88 | | - * that there is only one integer given |
89 | | - * as an argument for the format and |
90 | | - * specifying invalid format may cause |
91 | | - * unspecified behaviour.) |
92 | | - * thread_name Name of the kernel thread process used by the |
93 | | - * MSF. You can safely set it to NULL |
94 | | - * (in which case default "file-storage" |
95 | | - * will be used). |
96 | | - * |
97 | 78 | * vendor_name |
98 | 79 | * product_name |
99 | 80 | * release Information used as a reply to INQUIRY |
|
155 | 136 | * a buffer from being used by more than one endpoint. |
156 | 137 | * |
157 | 138 | * |
158 | | - * The pathnames of the backing files and the ro settings are |
159 | | - * available in the attribute files "file" and "ro" in the lun<n> (or |
160 | | - * to be more precise in a directory which name comes from |
161 | | - * "lun_name_format" option!) subdirectory of the gadget's sysfs |
162 | | - * directory. If the "removable" option is set, writing to these |
163 | | - * files will simulate ejecting/loading the medium (writing an empty |
164 | | - * line means eject) and adjusting a write-enable tab. Changes to the |
165 | | - * ro setting are not allowed when the medium is loaded or if CD-ROM |
166 | | - * emulation is being used. |
| 139 | + * The pathnames of the backing files, the ro settings and nofua |
| 140 | + * settings are available in the attribute files "file", "ro" and |
| 141 | + * "nofua" in the lun<n> subdirectory of the gadget's sysfs directory. |
| 142 | + * If the "removable" option is set, writing to these files will |
| 143 | + * simulate ejecting/loading the medium (writing an empty line means |
| 144 | + * eject) and adjusting a write-enable tab. Changes to the ro setting |
| 145 | + * are not allowed when the medium is loaded or if CD-ROM emulation is |
| 146 | + * being used. |
167 | 147 | * |
168 | 148 | * When a LUN receive an "eject" SCSI request (Start/Stop Unit), |
169 | 149 | * if the LUN is removable, the backing file is released to simulate |
@@ -417,9 +397,6 @@ struct fsg_config { |
417 | 397 | char nofua; |
418 | 398 | } luns[FSG_MAX_LUNS]; |
419 | 399 |
|
420 | | - const char *lun_name_format; |
421 | | - const char *thread_name; |
422 | | - |
423 | 400 | /* Callback functions. */ |
424 | 401 | const struct fsg_operations *ops; |
425 | 402 | /* Gadget's private data. */ |
@@ -2792,11 +2769,7 @@ static struct fsg_common *fsg_common_init(struct fsg_common *common, |
2792 | 2769 | curlun->dev.parent = &gadget->dev; |
2793 | 2770 | /* curlun->dev.driver = &fsg_driver.driver; XXX */ |
2794 | 2771 | dev_set_drvdata(&curlun->dev, &common->filesem); |
2795 | | - dev_set_name(&curlun->dev, |
2796 | | - cfg->lun_name_format |
2797 | | - ? cfg->lun_name_format |
2798 | | - : "lun%d", |
2799 | | - i); |
| 2772 | + dev_set_name(&curlun->dev, "lun%d", i); |
2800 | 2773 |
|
2801 | 2774 | rc = device_register(&curlun->dev); |
2802 | 2775 | if (rc) { |
@@ -2878,8 +2851,7 @@ static struct fsg_common *fsg_common_init(struct fsg_common *common, |
2878 | 2851 |
|
2879 | 2852 | /* Tell the thread to start working */ |
2880 | 2853 | common->thread_task = |
2881 | | - kthread_create(fsg_main_thread, common, |
2882 | | - cfg->thread_name ?: "file-storage"); |
| 2854 | + kthread_create(fsg_main_thread, common, "file-storage"); |
2883 | 2855 | if (IS_ERR(common->thread_task)) { |
2884 | 2856 | rc = PTR_ERR(common->thread_task); |
2885 | 2857 | goto error_release; |
@@ -3175,8 +3147,6 @@ fsg_config_from_params(struct fsg_config *cfg, |
3175 | 3147 | } |
3176 | 3148 |
|
3177 | 3149 | /* Let MSF use defaults */ |
3178 | | - cfg->lun_name_format = 0; |
3179 | | - cfg->thread_name = 0; |
3180 | 3150 | cfg->vendor_name = 0; |
3181 | 3151 | cfg->product_name = 0; |
3182 | 3152 | cfg->release = 0xffff; |
|
0 commit comments