zram: remove zram stats code duplication
authorSergey Senozhatsky <sergey.senozhatsky@gmail.com>
Mon, 7 Apr 2014 22:38:04 +0000 (15:38 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 7 Apr 2014 23:36:00 +0000 (16:36 -0700)
commita68eb3b65e658406d386bebef02277f4007b2f45
tree26e8c5a63560e39a7a79275c4fc7a851f0922f02
parent90a7806ea9b9f7cb4751859cc2506e2d80e36ef1
zram: remove zram stats code duplication

Introduce ZRAM_ATTR_RO macro that generates device_attribute and default
ATTR show() function for existing atomic64_t zram stats.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Cc: Jerome Marchand <jmarchan@redhat.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/block/zram/zram_drv.c