Source
183
183
*num_parts = this_part + 1;
184
184
alloc_size = *num_parts * sizeof(struct mtd_partition) +
185
185
extra_mem_size;
186
186
187
187
parts = kzalloc(alloc_size, GFP_KERNEL);
188
188
if (!parts)
189
189
return ERR_PTR(-ENOMEM);
190
190
extra_mem = (unsigned char *)(parts + *num_parts);
191
191
}
192
192
193
-
/* enter this partition (offset will be calculated later if it is zero at this point) */
193
+
/*
194
+
* enter this partition (offset will be calculated later if it is
195
+
* OFFSET_CONTINUOUS at this point)
196
+
*/
194
197
parts[this_part].size = size;
195
198
parts[this_part].offset = offset;
196
199
parts[this_part].mask_flags = mask_flags;
197
200
if (name)
198
201
strlcpy(extra_mem, name, name_len + 1);
199
202
else
200
203
sprintf(extra_mem, "Partition_%03d", this_part);
201
204
parts[this_part].name = extra_mem;
202
205
extra_mem += name_len + 1;
203
206