diff options
-rw-r--r-- | drivers/mtd/ubi/cdev.c | 8 | ||||
-rw-r--r-- | include/mtd/ubi-user.h | 19 |
2 files changed, 14 insertions, 13 deletions
diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c index 9a1703286411..4119cb857c97 100644 --- a/drivers/mtd/ubi/cdev.c +++ b/drivers/mtd/ubi/cdev.c | |||
@@ -561,18 +561,18 @@ static long vol_cdev_ioctl(struct file *file, unsigned int cmd, | |||
561 | } | 561 | } |
562 | 562 | ||
563 | /* Set volume property command */ | 563 | /* Set volume property command */ |
564 | case UBI_IOCSETPROP: | 564 | case UBI_IOCSETVOLPROP: |
565 | { | 565 | { |
566 | struct ubi_set_prop_req req; | 566 | struct ubi_set_vol_prop_req req; |
567 | 567 | ||
568 | err = copy_from_user(&req, argp, | 568 | err = copy_from_user(&req, argp, |
569 | sizeof(struct ubi_set_prop_req)); | 569 | sizeof(struct ubi_set_vol_prop_req)); |
570 | if (err) { | 570 | if (err) { |
571 | err = -EFAULT; | 571 | err = -EFAULT; |
572 | break; | 572 | break; |
573 | } | 573 | } |
574 | switch (req.property) { | 574 | switch (req.property) { |
575 | case UBI_PROP_DIRECT_WRITE: | 575 | case UBI_VOL_PROP_DIRECT_WRITE: |
576 | mutex_lock(&ubi->device_mutex); | 576 | mutex_lock(&ubi->device_mutex); |
577 | desc->vol->direct_writes = !!req.value; | 577 | desc->vol->direct_writes = !!req.value; |
578 | mutex_unlock(&ubi->device_mutex); | 578 | mutex_unlock(&ubi->device_mutex); |
diff --git a/include/mtd/ubi-user.h b/include/mtd/ubi-user.h index c0d47ad4b103..8d8484b1ed46 100644 --- a/include/mtd/ubi-user.h +++ b/include/mtd/ubi-user.h | |||
@@ -131,7 +131,7 @@ | |||
131 | * ~~~~~~~~~~~~~~~~~~~~~~~~~ | 131 | * ~~~~~~~~~~~~~~~~~~~~~~~~~ |
132 | * | 132 | * |
133 | * To set an UBI volume property the %UBI_IOCSETPROP ioctl command should be | 133 | * To set an UBI volume property the %UBI_IOCSETPROP ioctl command should be |
134 | * used. A pointer to a &struct ubi_set_prop_req object is expected to be | 134 | * used. A pointer to a &struct ubi_set_vol_prop_req object is expected to be |
135 | * passed. The object describes which property should be set, and to which value | 135 | * passed. The object describes which property should be set, and to which value |
136 | * it should be set. | 136 | * it should be set. |
137 | */ | 137 | */ |
@@ -186,7 +186,8 @@ | |||
186 | /* Check if LEB is mapped command */ | 186 | /* Check if LEB is mapped command */ |
187 | #define UBI_IOCEBISMAP _IOR(UBI_VOL_IOC_MAGIC, 5, __s32) | 187 | #define UBI_IOCEBISMAP _IOR(UBI_VOL_IOC_MAGIC, 5, __s32) |
188 | /* Set an UBI volume property */ | 188 | /* Set an UBI volume property */ |
189 | #define UBI_IOCSETPROP _IOW(UBI_VOL_IOC_MAGIC, 6, struct ubi_set_prop_req) | 189 | #define UBI_IOCSETVOLPROP _IOW(UBI_VOL_IOC_MAGIC, 6, \ |
190 | struct ubi_set_vol_prop_req) | ||
190 | 191 | ||
191 | /* Maximum MTD device name length supported by UBI */ | 192 | /* Maximum MTD device name length supported by UBI */ |
192 | #define MAX_UBI_MTD_NAME_LEN 127 | 193 | #define MAX_UBI_MTD_NAME_LEN 127 |
@@ -225,11 +226,11 @@ enum { | |||
225 | /* | 226 | /* |
226 | * UBI set property ioctl constants | 227 | * UBI set property ioctl constants |
227 | * | 228 | * |
228 | * @UBI_PROP_DIRECT_WRITE: allow / disallow user to directly write and | 229 | * @UBI_VOL_PROP_DIRECT_WRITE: allow / disallow user to directly write and |
229 | * erase individual eraseblocks on dynamic volumes | 230 | * erase individual eraseblocks on dynamic volumes |
230 | */ | 231 | */ |
231 | enum { | 232 | enum { |
232 | UBI_PROP_DIRECT_WRITE = 1, | 233 | UBI_VOL_PROP_DIRECT_WRITE = 1, |
233 | }; | 234 | }; |
234 | 235 | ||
235 | /** | 236 | /** |
@@ -397,13 +398,13 @@ struct ubi_map_req { | |||
397 | 398 | ||
398 | 399 | ||
399 | /** | 400 | /** |
400 | * struct ubi_set_prop_req - a data structure used to set an ubi volume | 401 | * struct ubi_set_vol_prop_req - a data structure used to set an ubi volume |
401 | * property. | 402 | * property. |
402 | * @property: property to set (%UBI_PROP_DIRECT_WRITE) | 403 | * @property: property to set (%UBI_VOL_PROP_DIRECT_WRITE) |
403 | * @padding: reserved for future, not used, has to be zeroed | 404 | * @padding: reserved for future, not used, has to be zeroed |
404 | * @value: value to set | 405 | * @value: value to set |
405 | */ | 406 | */ |
406 | struct ubi_set_prop_req { | 407 | struct ubi_set_vol_prop_req { |
407 | __u8 property; | 408 | __u8 property; |
408 | __u8 padding[7]; | 409 | __u8 padding[7]; |
409 | __u64 value; | 410 | __u64 value; |