staging: zram: handle mem suffixes in disk size zram_sysfs parameter
authorSergey Senozhatsky <sergey.senozhatsky@gmail.com>
Tue, 30 Oct 2012 19:42:31 +0000 (22:42 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Oct 2012 21:49:09 +0000 (14:49 -0700)
commit26907840e63b3187266db1865e76ea9e98b01b19
tree434099979468212dba48e2f209f75c6369611eef
parent37b51fdddf64e7ba0971d070428655f8d6f36578
staging: zram: handle mem suffixes in disk size zram_sysfs parameter

Use memparse() to allow mem suffixes in disksize sysfs number.
Examples:
    echo 256K > /sys/block/zram0/disksize
    echo 512M > /sys/block/zram0/disksize
    echo 1G > /sys/block/zram0/disksize

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Reviewed-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/zram/zram_sysfs.c