diff options
author | John Crispin <john@openwrt.org> | 2014-06-11 12:59:15 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2014-06-11 12:59:15 +0000 |
commit | c8d472c37f07e3a0d7a5ba05ec3b7538a72ad81c (patch) | |
tree | 038631553628aa0beb963792b5dc13454bbead28 /target/linux/generic/patches-3.10/044-UBI-rename-block-device-ioctls.patch | |
parent | acbcd5f5b5465b28f966abd7f8da98062ba09935 (diff) | |
download | upstream-c8d472c37f07e3a0d7a5ba05ec3b7538a72ad81c.tar.gz upstream-c8d472c37f07e3a0d7a5ba05ec3b7538a72ad81c.tar.bz2 upstream-c8d472c37f07e3a0d7a5ba05ec3b7538a72ad81c.zip |
kernel: backport the ubiblock patches from 3.14->3.10
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 41120
Diffstat (limited to 'target/linux/generic/patches-3.10/044-UBI-rename-block-device-ioctls.patch')
-rw-r--r-- | target/linux/generic/patches-3.10/044-UBI-rename-block-device-ioctls.patch | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/target/linux/generic/patches-3.10/044-UBI-rename-block-device-ioctls.patch b/target/linux/generic/patches-3.10/044-UBI-rename-block-device-ioctls.patch new file mode 100644 index 0000000000..a010a3cf4a --- /dev/null +++ b/target/linux/generic/patches-3.10/044-UBI-rename-block-device-ioctls.patch @@ -0,0 +1,92 @@ +From 8af871887fcba470ff9265c65cff7d14d9e0e3f9 Mon Sep 17 00:00:00 2001 +From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> +Date: Wed, 5 Mar 2014 13:01:56 +0200 +Subject: [PATCH] UBI: rename block device ioctls + +Rename the UBI_IOCVOLATTBLK and UBI_IOCVOLDETBLK to UBI_IOCVOLCRBLK and +UBI_IOCVOLRMBLK, because we do not use terms "attach" and "detach" for the R/O +block devices on top of UBI volumes. Instead, we use terms "create" and +"remove". This patch also amends the related commentaries. + +Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> +Acked-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> +--- + drivers/mtd/ubi/block.c | 2 +- + drivers/mtd/ubi/cdev.c | 8 ++++---- + include/uapi/mtd/ubi-user.h | 14 +++++++------- + 3 files changed, 12 insertions(+), 12 deletions(-) + +diff --git a/drivers/mtd/ubi/block.c b/drivers/mtd/ubi/block.c +index 16e6731..69a74fd 100644 +--- a/drivers/mtd/ubi/block.c ++++ b/drivers/mtd/ubi/block.c +@@ -32,7 +32,7 @@ + * This feature is compiled in the UBI core, and adds a 'block' parameter + * to allow early creation of block devices on top of UBI volumes. Runtime + * block creation/removal for UBI volumes is provided through two UBI ioctls: +- * UBI_IOCVOLATTBLK and UBI_IOCVOLDETBLK. ++ * UBI_IOCVOLCRBLK and UBI_IOCVOLRMBLK. + */ + + #include <linux/module.h> +diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c +index 11c8473..f54562a 100644 +--- a/drivers/mtd/ubi/cdev.c ++++ b/drivers/mtd/ubi/cdev.c +@@ -561,8 +561,8 @@ static long vol_cdev_ioctl(struct file *file, unsigned int cmd, + break; + } + +- /* Attach a block device to an UBI volume */ +- case UBI_IOCVOLATTBLK: ++ /* Create a R/O block device on top of the UBI volume */ ++ case UBI_IOCVOLCRBLK: + { + struct ubi_volume_info vi; + +@@ -571,8 +571,8 @@ static long vol_cdev_ioctl(struct file *file, unsigned int cmd, + break; + } + +- /* Dettach a block device from an UBI volume */ +- case UBI_IOCVOLDETBLK: ++ /* Remove the R/O block device */ ++ case UBI_IOCVOLRMBLK: + { + struct ubi_volume_info vi; + +diff --git a/include/uapi/mtd/ubi-user.h b/include/uapi/mtd/ubi-user.h +index b98585a..9c885e2 100644 +--- a/include/uapi/mtd/ubi-user.h ++++ b/include/uapi/mtd/ubi-user.h +@@ -138,9 +138,9 @@ + * Block devices on UBI volumes + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + * +- * To attach or detach a block device from an UBI volume the %UBI_IOCVOLATTBLK +- * and %UBI_IOCVOLDETBLK ioctl commands should be used, respectively. +- * These commands take no arguments. ++ * To create or remove a R/O block device on top of an UBI volume the ++ * %UBI_IOCVOLCRBLK and %UBI_IOCVOLRMBLK ioctl commands should be used, ++ * respectively. These commands take no arguments. + */ + + /* +@@ -198,10 +198,10 @@ + /* Set an UBI volume property */ + #define UBI_IOCSETVOLPROP _IOW(UBI_VOL_IOC_MAGIC, 6, \ + struct ubi_set_vol_prop_req) +-/* Attach a block device to an UBI volume */ +-#define UBI_IOCVOLATTBLK _IO(UBI_VOL_IOC_MAGIC, 7) +-/* Detach a block device from an UBI volume */ +-#define UBI_IOCVOLDETBLK _IO(UBI_VOL_IOC_MAGIC, 8) ++/* Create a R/O block device on top of an UBI volume */ ++#define UBI_IOCVOLCRBLK _IO(UBI_VOL_IOC_MAGIC, 7) ++/* Remove the R/O block device */ ++#define UBI_IOCVOLRMBLK _IO(UBI_VOL_IOC_MAGIC, 8) + + /* Maximum MTD device name length supported by UBI */ + #define MAX_UBI_MTD_NAME_LEN 127 +-- +1.9.2 + |